Comment 21 for bug 1654116

Revision history for this message
Stuart Bishop (stub) wrote :

You are going to want some better instrumentation. The leader-elected hook is not run when the unit becomes leader. It is run some time after the unit has become leader, and as far as I know there is no guarantee that it is still the leader when it happens. I'd stick an 'assert is_leader()' in the leader_set wrapper, possibly by monkey patching charmhelpers.core.hookenv.leader_set()