Alon Bar-Lev has uploaded a new change for review.

Change subject: packages: vdsm: vdsm-tool was introduced later than oldest 
supported vdsm
......................................................................

packages: vdsm: vdsm-tool was introduced later than oldest supported vdsm

Change-Id: If9c402382292300cda586792669233c95f4f9ec3
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M src/plugins/ovirt-host-deploy/vdsm/packages.py
1 file changed, 17 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy 
refs/changes/84/18384/1

diff --git a/src/plugins/ovirt-host-deploy/vdsm/packages.py 
b/src/plugins/ovirt-host-deploy/vdsm/packages.py
index 3196e44..489dd2a 100644
--- a/src/plugins/ovirt-host-deploy/vdsm/packages.py
+++ b/src/plugins/ovirt-host-deploy/vdsm/packages.py
@@ -132,14 +132,24 @@
         stage=plugin.Stages.STAGE_CLOSEUP,
     )
     def _reconfigure(self):
-        rc, stdout, stderr = self.execute(
-            (
-                self.command.get('vdsm-tool'),
-                'libvirt-configure',
-            ),
-            raiseOnError=False,
+        useLegacy = True
+
+        vdsm_tool = self.command.get(
+            command='vdsm-tool',
+            optional=True,
         )
-        if rc != 0:
+        if vdsm_tool is not None:
+            rc, stdout, stderr = self.execute(
+                (
+                    vdsm_tool,
+                    'libvirt-configure',
+                ),
+                raiseOnError=False,
+            )
+            if rc == 0:
+                useLegacy = False
+
+        if useLegacy:
             self.logger.debug('Cannot reconfigure vdsm using vdsm-tool')
             for script in ('/etc/init.d/vdsmd', '/lib/systemd/systemd-vdsmd'):
                 if os.path.exists(script):


-- 
To view, visit http://gerrit.ovirt.org/18384
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9c402382292300cda586792669233c95f4f9ec3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-host-deploy
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to