Change in vdsm[master]: validate listen_tls config value in libvirtd.conf

ybronhei at redhat.com ybronhei at redhat.com
Sun Jul 12 08:32:34 UTC 2015


Yaniv Bronhaim has uploaded a new change for review.

Change subject: validate listen_tls config value in libvirtd.conf
......................................................................

validate listen_tls config value in libvirtd.conf

Currently we don't validate this value which leads to broken
behaviour in migration over ssl.

Change-Id: Iedad148fd0f99fe02988a87a8bdfc0a9cc64d282
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1148024
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M lib/vdsm/tool/configurators/libvirt.py
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/43437/1

diff --git a/lib/vdsm/tool/configurators/libvirt.py b/lib/vdsm/tool/configurators/libvirt.py
index e4e3197..02e8561 100644
--- a/lib/vdsm/tool/configurators/libvirt.py
+++ b/lib/vdsm/tool/configurators/libvirt.py
@@ -125,16 +125,19 @@
     lconf_p = ParserWrapper({
         'listen_tcp': '0',
         'auth_tcp': 'sasl',
+        'listen_tls': '1',
     })
     lconf_p.read(_getFile('LCONF'))
     listen_tcp = lconf_p.getint('listen_tcp')
     auth_tcp = lconf_p.get('auth_tcp')
+    listen_tls = lconf_p.getint('listen_tls')
     qconf_p = ParserWrapper({'spice_tls': '0'})
     qconf_p.read(_getFile('QCONF'))
     spice_tls = qconf_p.getboolean('spice_tls')
     ret = True
     if ssl:
-        if listen_tcp != 1 and auth_tcp != '"none"' and spice_tls != 0:
+        if listen_tls != 0 and listen_tcp != 1 and auth_tcp != '"none"' and \
+                spice_tls != 0:
             sys.stdout.write(
                 "SUCCESS: ssl configured to true. No conflicts\n")
         else:
@@ -148,7 +151,8 @@
             )
             ret = False
     else:
-        if listen_tcp == 1 and auth_tcp == '"none"' and spice_tls == 0:
+        if listen_tls == 0 and listen_tcp == 1 and auth_tcp == '"none"' and \
+                spice_tls == 0:
             sys.stdout.write(
                 "SUCCESS: ssl configured to false. No conflicts.\n")
         else:


-- 
To view, visit https://gerrit.ovirt.org/43437
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedad148fd0f99fe02988a87a8bdfc0a9cc64d282
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>


More information about the vdsm-patches mailing list