Martin Sivák has uploaded a new change for review. Change subject: Do not emit email events when the state was not changed ......................................................................
Do not emit email events when the state was not changed This also fixes the trigger regexp to be more in alignment with the current state machine. Change-Id: I2da55f4497fd139a0a1ba4f3079a4e97972adb08 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1146433 Signed-off-by: Martin Sivak <[email protected]> (cherry picked from commit da8f16f844ec527f85f04a0f2a460b79e1c7d9ab) --- M ovirt_hosted_engine_ha/agent/hosted_engine.py M ovirt_hosted_engine_ha/broker/broker.conf 2 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-ha refs/changes/18/33518/1 diff --git a/ovirt_hosted_engine_ha/agent/hosted_engine.py b/ovirt_hosted_engine_ha/agent/hosted_engine.py index 3ccd656..e6217f3 100644 --- a/ovirt_hosted_engine_ha/agent/hosted_engine.py +++ b/ovirt_hosted_engine_ha/agent/hosted_engine.py @@ -308,10 +308,11 @@ break self._log.debug("Processing engine state %s", state) - self._broker.notify(brokerlink.NotifyEvents.STATE_TRANSITION, - "%s-%s" % (old_state.__class__.__name__, - state.__class__.__name__), - hostname=socket.gethostname()) + if old_state.__class__.__name__ != state.__class__.__name__: + self._broker.notify(brokerlink.NotifyEvents.STATE_TRANSITION, + "%s-%s" % (old_state.__class__.__name__, + state.__class__.__name__), + hostname=socket.gethostname()) try: # make sure everything is still initialized diff --git a/ovirt_hosted_engine_ha/broker/broker.conf b/ovirt_hosted_engine_ha/broker/broker.conf index 14bfa47..dec28bd 100644 --- a/ovirt_hosted_engine_ha/broker/broker.conf +++ b/ovirt_hosted_engine_ha/broker/broker.conf @@ -5,4 +5,4 @@ source-email=root@localhost [notify] -state_transition=maintenance|start|stop|migrate|on +state_transition=maintenance|start|stop|migrate|up|down -- To view, visit http://gerrit.ovirt.org/33518 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2da55f4497fd139a0a1ba4f3079a4e97972adb08 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-ha Gerrit-Branch: ovirt-hosted-engine-ha-1.2 Gerrit-Owner: Martin Sivák <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
