Running vault authorize-charm action against non-leader fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vault-charm |
In Progress
|
Medium
|
Bartosz Woronicz |
Bug Description
When running authorize-charm action against a non-leader I'm getting an error:
021-02-16 09:09:12 INFO juju-log Initializing Leadership Layer (is follower)
2021-02-16 09:09:12 INFO juju-log Invoking reactive handler: reactive/
2021-02-16 09:09:13 INFO juju-log Etcd detected, setting api_addr to http://
2021-02-16 09:09:13 INFO juju-log Invoking reactive handler: reactive/
2021-02-16 09:09:13 INFO juju-log Invoking reactive handler: reactive/
2021-02-16 09:09:13 INFO juju-log Invoking reactive handler: reactive/
2021-02-16 09:09:13 INFO juju-log Invoking reactive handler: reactive/
2021-02-16 09:09:13 INFO juju-log Invoking reactive handler: reactive/
2021-02-16 09:09:13 INFO juju-log Invoking reactive handler: hooks/relations
2021-02-16 09:09:16 INFO juju.worker.
2021-02-16 09:09:32 INFO juju-log DEPRECATION WARNING: Function action_fail is being removed : moved to function_fail()
2021-02-16 09:09:32 INFO juju-log DEPRECATION WARNING: Function action_get is being removed : moved to function_get()
2021-02-16 09:09:32 WARNING authorize-charm ERROR cannot write leadership settings: cannot write settings: not the leader
2021-02-16 09:09:32 ERROR juju-log Traceback (most recent call last):
File "/var/lib/
action(args)
File "/var/lib/
hookenv.
File "/var/lib/
return f(*args, **kwargs)
File "/var/lib/
subprocess.
File "/usr/lib/
raise CalledProcessEr
subprocess.
Version cs:vault-40
Changed in vault-charm: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: onboarding |
Changed in vault-charm: | |
assignee: | nobody → mastier1 (mastier1) |
Changed in vault-charm: | |
status: | Triaged → Confirmed |
status: | Confirmed → In Progress |
tags: |
added: good-first-bug removed: onboarding |
I can reproduce the bug with the simple clustered vault setup
$ juju run-action --wait vault/4 authorize-charm token=s. Fz4eOtkZXi2hmM7 xEbdydWrx CalledProcessEr ror: Command ''[''leader-set'', ''local- charm-access- id=c220509c- 043e-e450- 9231-2e3063cd88 86'']''
unit-vault-4:
UnitId: vault/4
id: "8"
message: 'subprocess.
returned non-zero exit status 1.'
results:
Stderr: |
ERROR cannot write leadership settings: cannot write settings: not the leader
status: failed
timing:
completed: 2021-02-19 16:14:24 +0000 UTC
enqueued: 2021-02-19 16:14:19 +0000 UTC
started: 2021-02-19 16:14:22 +0000 UTC
It seems the leader checker is not working correctly in this case for authorize-charm action. Will investigate further.