Alon Bar-Lev has uploaded a new change for review. Change subject: vdsm: packages: use new method of libvirt reconfigure ......................................................................
vdsm: packages: use new method of libvirt reconfigure Change-Id: Ib8b29fb7b8d9e44e55c4a44a25378234d39afb54 Signed-off-by: Alon Bar-Lev <[email protected]> --- M ChangeLog M src/plugins/ovirt-host-deploy/vdsm/packages.py 2 files changed, 25 insertions(+), 14 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy refs/changes/62/16962/1 diff --git a/ChangeLog b/ChangeLog index c8f6313..f338cc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ * vdsm: vdsmid: detect power cpu correctly. * vdsm: ovirt-node: detect nodes with own bridges and report back. * vdsm: packages: cgconfig is dependency of libvirt. + * vdsm: packages: use new method of libvirt reconfigure. * gluster: packages: start glusterd if no reboot. * openstack: add neutron support. * build: re-introduce external gettext packaging. diff --git a/src/plugins/ovirt-host-deploy/vdsm/packages.py b/src/plugins/ovirt-host-deploy/vdsm/packages.py index 39b31f6..15fb65a 100644 --- a/src/plugins/ovirt-host-deploy/vdsm/packages.py +++ b/src/plugins/ovirt-host-deploy/vdsm/packages.py @@ -55,6 +55,12 @@ ) @plugin.event( + stage=plugin.Stages.STAGE_SETUP, + ) + def _setup(self): + self.command.detect('vdsm-tool') + + @plugin.event( stage=plugin.Stages.STAGE_VALIDATION, ) def _validation(self): @@ -119,24 +125,28 @@ if self.services.exists('cgconfig'): self.services.startup('cgconfig', True) - # WORKAROUND-BEGIN - # old vdsm does not support the reconfigure trigger. - # we need to manually locate and reconfigure the init.d script. - # can be removed while vdsm-4.9.6 (no fix) is gone. @plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, ) def _reconfigure(self): - for script in ('/etc/init.d/vdsmd', '/lib/systemd/systemd-vdsmd'): - if os.path.exists(script): - rc, stdout, stderr = self.execute( - [script, 'reconfigure'], - raiseOnError=False - ) - if rc != 0: - self.logger.warning('Cannot reconfigure vdsm') - break - # WORKAROUND-END + rc, stdout, stderr = self.execute( + ( + self.command.get('vdsm-tool'), + 'libvirt-reconfigure', + ), + raiseOnError=False, + ) + if rc != 0: + self.logger.warning('Cannot reconfigure vdsm using vdsm-tool') + for script in ('/etc/init.d/vdsmd', '/lib/systemd/systemd-vdsmd'): + if os.path.exists(script): + rc, stdout, stderr = self.execute( + [script, 'reconfigure'], + raiseOnError=False + ) + if rc != 0: + self.logger.warning('Cannot reconfigure vdsm') + break @plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, -- To view, visit http://gerrit.ovirt.org/16962 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8b29fb7b8d9e44e55c4a44a25378234d39afb54 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-host-deploy Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
