ERROR cannot write leadership settings: cannot write settings: not the leader
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Unassigned | ||
Ceph Monitor Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
2018-03-30 01:56:50 DEBUG worker.uniter.jujuc server.go:181 running hook tool "leader-set"
2018-03-30 01:57:01 DEBUG juju.worker.
2018-03-30 01:57:26 DEBUG juju.worker.
2018-03-30 01:58:27 INFO juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
2018-03-30 01:58:27 DEBUG config-changed ERROR cannot write leadership settings: cannot write settings: not the leader
2018-03-30 01:58:27 DEBUG config-changed Traceback (most recent call last):
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed hooks.execute(
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed self._hooks[
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed return f(*args, **kwargs)
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed leader_set(opts)
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed return f(*args, **kwargs)
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed subprocess.
2018-03-30 01:58:27 DEBUG config-changed File "/usr/lib/
2018-03-30 01:58:27 DEBUG config-changed raise CalledProcessEr
2018-03-30 01:58:27 DEBUG config-changed subprocess.
2018-03-30 01:58:27 ERROR juju.worker.
tags: | added: leadership |
Changed in juju: | |
importance: | Undecided → Medium |
status: | New → Triaged |
This looks like a bug or race in juju itself.
2018-03-30 01:49:16 DEBUG juju.worker. dependency engine.go:486 "leadership- tracker" manifold worker started leadership tracker.go:131 ceph-mon/1 making initial claim for ceph-mon leadership leadership tracker.go:200 ceph-mon/1 promoted to leadership of ceph-mon uniter. operation executor.go:60 running operation accept leadership uniter. operation executor.go:91 preparing operation "accept leadership" uniter. operation executor.go:91 committing operation "accept leadership" leadership tracker.go:223 ceph-mon leadership for ceph-mon/1 denied leadership tracker.go:237 notifying ceph-mon/1 ticket of impending loss of ceph-mon leadership leadership tracker.go:276 ceph-mon/1 is not ceph-mon leader leadership tracker.go:230 ceph-mon/1 waiting for ceph-mon leadership release uniter. remotestate watcher.go:445 got leadership change for ceph-mon/1: minion
2018-03-30 01:49:16 DEBUG juju.worker.
2018-03-30 01:49:59 INFO juju.worker.
2018-03-30 01:54:26 DEBUG juju.worker.
2018-03-30 01:54:26 DEBUG juju.worker.
2018-03-30 01:54:26 DEBUG juju.worker.
2018-03-30 01:58:27 INFO juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
2018-03-30 01:58:27 DEBUG juju.worker.
However, just before the Traceback the charm executes is-leader in the hookenv and gets a positive answer from Juju.
2018-03-30 01:58:27 DEBUG config-changed ERROR cannot write leadership settings: cannot write settings: not the leader juju/agents/ unit-ceph- mon-1/charm/ hooks/config- changed" , line 725, in <module> sys.argv) juju/agents/ unit-ceph- mon-1/charm/ hooks/charmhelp ers/core/ hookenv. py", line 800, in execute hook_name] () juju/agents/ unit-ceph- mon-1/charm/ hooks/charmhelp ers/contrib/ hardening/ harden. py", line 79, in _harden_inner2 juju/agents/ unit-ceph- mon-1/charm/ hooks/config- changed" , line 214, in config_changed juju/agents/ unit-ceph- mon-1/charm/ hooks/charmhelp ers/core/ hookenv. py", line 929, in inner_translate _exc2 juju/agents/ unit-ceph- mon-1/charm/ hooks/charmhelp ers/core/ hookenv. py", line 982, in leader_set check_call( cmd) python3. 5/subprocess. py", line 581, in check_call ror(retcode, cmd) CalledProcessEr ror: Command '['le...
2018-03-30 01:58:27 DEBUG config-changed Traceback (most recent call last):
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed hooks.execute(
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed self._hooks[
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed return f(*args, **kwargs)
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed leader_set(opts)
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed return f(*args, **kwargs)
2018-03-30 01:58:27 DEBUG config-changed File "/var/lib/
2018-03-30 01:58:27 DEBUG config-changed subprocess.
2018-03-30 01:58:27 DEBUG config-changed File "/usr/lib/
2018-03-30 01:58:27 DEBUG config-changed raise CalledProcessEr
2018-03-30 01:58:27 DEBUG config-changed subprocess.