Darshan N has uploaded a new change for review. Change subject: gluster: Fix: reboot nrpe nervice during host deploy. ......................................................................
gluster: Fix: reboot nrpe nervice during host deploy. This patch reboots the nrpe service if nrpe configuration is modified during host deploy. This is done for reflecting the config changes. Change-Id: I7d1164d97ce9b95de0107990733dc7ecb1fe3974 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1110623 Signed-off-by: ndarshan <dnara...@redhat.com> --- M src/plugins/ovirt-host-deploy/gluster/nrpe.py 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy refs/changes/90/28890/1 diff --git a/src/plugins/ovirt-host-deploy/gluster/nrpe.py b/src/plugins/ovirt-host-deploy/gluster/nrpe.py index ec3386e..08a29b7 100644 --- a/src/plugins/ovirt-host-deploy/gluster/nrpe.py +++ b/src/plugins/ovirt-host-deploy/gluster/nrpe.py @@ -83,6 +83,7 @@ def __init__(self, context): super(Plugin, self).__init__(context=context) + self._modified = False @plugin.event( stage=plugin.Stages.STAGE_INIT, @@ -119,6 +120,7 @@ ] ) if content != newcontent: + self._modified = True self.environment[ otopicons.CoreEnv.MAIN_TRANSACTION ].append( @@ -131,5 +133,19 @@ ) ) + @plugin.event( + stage=plugin.Stages.STAGE_CLOSEUP, + condition=lambda self: ( + self._modified + ) + ) + def _closeup(self): + if self.services.exists('nrpe'): + self.logger.info(_('Rebooting nrpe service')) + for state in (False, True): + self.services.state('nrpe', state) + self.services.startup('nrpe', True) + + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit http://gerrit.ovirt.org/28890 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d1164d97ce9b95de0107990733dc7ecb1fe3974 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-host-deploy Gerrit-Branch: master Gerrit-Owner: Darshan N <dnara...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches