Comment 16 for bug 1924780

Revision history for this message
Alexander Balderson (asbalderson) wrote : Re: easyrsa install hook fails on public address not found

SQA has also had a case where this happened on the etcd charm.
2021-08-24 23:22:30 ERROR unit.etcd/2.juju-log server.go:314 Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-etcd-2/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-etcd-2/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-etcd-2/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-etcd-2/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-etcd-2/charm/reactive/etcd.py", line 239, in rerender_config
    bag = EtcdDatabag()
  File "/var/lib/juju/agents/unit-etcd-2/charm/lib/etcd_databag.py", line 44, in __init__
    self.public_address = unit_get('public-address')
  File "/var/lib/juju/agents/unit-etcd-2/.venv/lib/python3.8/site-packages/charmhelpers/core/hookenv.py", line 93, in wrapper
    res = func(*args, **kwargs)
  File "/var/lib/juju/agents/unit-etcd-2/.venv/lib/python3.8/site-packages/charmhelpers/core/hookenv.py", line 870, in unit_get
    return json.loads(subprocess.check_output(_args).decode('UTF-8'))
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['unit-get', '--format=json', 'public-address']' returned non-zero exit status 1.

that run can be found here:
https://solutions.qa.canonical.com/testruns/testRun/ab6224ac-c5d2-4a5f-b6bf-844bc09a406f
crashdump at:
https://oil-jenkins.canonical.com/artifacts/ab6224ac-c5d2-4a5f-b6bf-844bc09a406f/generated/generated/kubernetes/juju-crashdump-kubernetes-2021-08-24-23.25.23.tar.gz