Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: setup: ensure restarted services survive reboot ......................................................................
packaging: setup: ensure restarted services survive reboot Ensure that hostile serivces restarted while upgrading are started also after reboot. Change-Id: I2333590beb9f4cabcc7eb68cbbacac85b453318d Bug-Url: https://bugzilla.redhat.com/1083551 Signed-off-by: Sandro Bonazzola <[email protected]> --- M packaging/setup/plugins/ovirt-engine-common/base/system/hostile_services.py 1 file changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/35/28235/1 diff --git a/packaging/setup/plugins/ovirt-engine-common/base/system/hostile_services.py b/packaging/setup/plugins/ovirt-engine-common/base/system/hostile_services.py index 96d12d4..c4480c0 100644 --- a/packaging/setup/plugins/ovirt-engine-common/base/system/hostile_services.py +++ b/packaging/setup/plugins/ovirt-engine-common/base/system/hostile_services.py @@ -83,20 +83,24 @@ @plugin.event( stage=plugin.Stages.STAGE_CLEANUP, - condition=lambda self: ( - self._enabled and - self.environment.get( - osetupcons.CoreEnv.REMOVE, - False - ) - ), + condition=lambda self: self._enabled, ) - def _closeup(self): + def _cleanup(self): + """ + Ensure that services we stopped while upgrading or cleaning are + restarted and they will start at reboot. + """ for service in self._toStart: - self.services.state( - name=service, - state=True - ) + if self.services.exists(service): + self.services.state( + name=service, + state=True + ) + # See https://bugzilla.redhat.com/1083551 + self.services.startup( + name=service, + state=True + ) # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit http://gerrit.ovirt.org/28235 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2333590beb9f4cabcc7eb68cbbacac85b453318d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
