One other thing that I did try, was I stopped both the unit agents so that they couldn't be refreshing/claiming a lease, and then started the agent that had previously been the leader again first. In my case it was:
And I *did* see that it got elected a second time and it did trigger leader-settings-changed even though it was the same leader.
So it sounds like if there was connectivity issues, and some reason why unit agents aren't able to renew their leases, we would see the leader-settings changed that you have.
One other thing that I did try, was I stopped both the unit agents so that they couldn't be refreshing/claiming a lease, and then started the agent that had previously been the leader again first. In my case it was:
juju ssh 0 juju_stop_unit ubuntu-operator/0
juju ssh 1 juju_stop_unit ubuntu-operator/1
sleep 60
juju ssh 1 juju_start_unit ubuntu-operator/1
sleep 2
juju ssh 0 juju_start_unit ubuntu_operator/0
And I *did* see that it got elected a second time and it did trigger leader- settings- changed even though it was the same leader.
So it sounds like if there was connectivity issues, and some reason why unit agents aren't able to renew their leases, we would see the leader-settings changed that you have.