Darshan N has uploaded a new change for review. Change subject: gluster: Restart nrpe nervice during host deploy. ......................................................................
gluster: Restart nrpe nervice during host deploy. This patch restarts 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 ChangeLog M src/plugins/ovirt-host-deploy/gluster/nrpe.py 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy refs/changes/02/28902/1 diff --git a/ChangeLog b/ChangeLog index 5052b32..782d0c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ * vdsm: fix dmidecode output parsing, rhbz#1109342. * vdsmhooks: fix package installation. + * gluster: Restart nrpe service during host deploy, rhbz#1110623. 2014-05-02 - Version 1.2.1 diff --git a/src/plugins/ovirt-host-deploy/gluster/nrpe.py b/src/plugins/ovirt-host-deploy/gluster/nrpe.py index ec3386e..6f6b0b3 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,18 @@ ) ) + @plugin.event( + stage=plugin.Stages.STAGE_CLOSEUP, + condition=lambda self: ( + odeploycons.GlusterEnv.MONITORING_ENABLE + ) + ) + def _closeup(self): + if self.services.exists('nrpe'): + self.logger.info(_('Restarting nrpe service')) + if self._modified: + self.services.state('nrpe', False) + self.services.state('nrpe', True) + self.services.startup('nrpe', True) # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit http://gerrit.ovirt.org/28902 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: ovirt-host-deploy-1.2 Gerrit-Owner: Darshan N <dnara...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches