partial sync when leader_id is empty, yielding inconsistent mirror
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Undecided
|
Unassigned | ||
juju-core |
Won't Fix
|
Undecided
|
Unassigned | ||
ubuntu-repository-cache (Juju Charms Collection) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
We've observed sometimes that ubuntu-
Workaround:
# note leader unit:
juju run --service ubuntu-
# update leader settings, and confirm rejected on expected non-leader units:
juju run --service ubuntu-
# ^-- if the unit that accepted the change is not the $leader_id unit, repeat from the start
# invoke a sync, or wait for one to occur, then confirm all units' values match:
juju run --service ubuntu-
I've looked over the charm, and this really seems to be a Juju bug. There is a single leadership setting, and it gets set in the leader-elected hook and is never unset. The deployment would never complete unless this setting actually gets set.
One of two things seems to be happening. Either Juju is resetting the leadership settings causing leader-get to return an empty dict, or leader-get is not handling failure and returning an empty dict when it should be failing.
losing leadership settings could potentially cause major data loss, with database clusters reinitializing themselves thinking they are a fresh install (no cassandra seeds, no postgresql master etc.).