Comment 2 for bug 1833089

Revision history for this message
Joseph Phillips (manadart) wrote : Re: ERROR cannot write leadership settings: cannot write settings: not the leader

This looks like it results from this patch:
https://github.com/juju/juju/pull/10301

After the original patch to fix https://bugs.launchpad.net/juju-core/+bug/1723184, calling leader-set would be a no-op if the unit was not the leader.

This was deemed to be incorrect behaviour.

Charms should call "is-leader" before attempting to call "leader-set", or use the "leader-elected" hook to change leader settings.