Make it possible to unpin leadership
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Ian Booth |
Bug Description
We recently ended up in a situation where a mysql application had no leader in Juju, at least according to 'juju status'. As far as I can tell, this happened because:
* 'series-
* mysql leadership was pinned to this unit by Juju
* [months pass]
* as part of some maintenance work, we removed this unit
* At the time of removal, Juju was 2.7.6, which does not have the following commit:
- https:/
Discovering the pinning was hard enough (that's LP #1890070), but once we had discovered it there was no obvious way to undo it and we ended up doing the following:
* Shutdown machine agent on all controllers
* Hack pinning out of /var/lib/
* Update CRC and size in /var/lib/
* rm /var/lib/
* Start up machine agent on all controllers
* Juju restored the raft cluster from the snapshot and without the Pinning
This triggered a new election for mysql (and all other applications) which a live unit won.
Obviously, that's insane and I don't want anyone else to have to do it. TL;DR: please add a CLI way to undo leadership pins. Thanks.
Changed in juju: | |
status: | Fix Committed → Fix Released |
With the commit referenced in the bug, there's an internal revoke leadership lease operation that is done on the raft FSM. It may be that what's needed here is to expose that via the CLI. This would force the election of a new leader.