When we use juju upgrade-charm, a new non-leader unit gets created, then the old still-leader one gets removed, resulting in the new unit being elected as the leader.
When the leader_elected event is not observed, the charm is not aware of having a leader now, so it remains stuck with message 'Waiting for leadership'.
This PR adds a fix to observe this event.
Note that this charm doesn't have unit tests, I added that to issues.
When we use
juju upgrade-charm
, a new non-leader unit gets created, then the old still-leader one gets removed, resulting in the new unit being elected as the leader. When theleader_elected
event is not observed, the charm is not aware of having a leader now, so it remains stuck with message 'Waiting for leadership'. This PR adds a fix to observe this event.Note that this charm doesn't have unit tests, I added that to issues.