I am trying to deploy a charm on Juju 2.8, and I'm getting this error:
2020-04-27 19:24:57 ERROR juju.worker.uniter.context context.go:753 "dex-auth/1" is not the leader but is setting application k8s spec
2020-04-27 19:24:57 ERROR juju-log oidc-client:8: pod-spec-set encountered an error: `ERROR this unit is not the leader`
2020-04-27 19:24:57 ERROR juju-log oidc-client:8: Hook error:
Traceback (most recent call last):
File "lib/charms/reactive/__init__.py", line 74, in main
bus.dispatch(restricted=restricted_mode)
File "lib/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "lib/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "lib/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-dex-auth-1/charm/reactive/dex_auth.py", line 154, in start_charm
for crd in yaml.safe_load_all(Path("resources/crds.yaml").read_text())
File "lib/charms/layer/caas_base.py", line 34, in pod_spec_set
run_hook_command("pod-spec-set", spec)
File "lib/charms/layer/caas_base.py", line 13, in run_hook_command
run([cmd], stdout=PIPE, stderr=PIPE, check=True, input=stdin.encode('utf-8'))
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pod-spec-set']' returned non-zero exit status 1.
In this case, `dex-auth` was not deployed differently from the other charms in the bundle, and ended up as the unit dex-auth/1, whereas the other charms are all charm-name/0. There's only one instance of dex-auth, so not sure how this happened.
Can we please get the full log of when this happened?