$ juju run --unit postgresql/0 "charms.reactive -p set_flag postgresql.cluster.initial-check"
moves the charm forward, however, it fails with the following errors:
2019-06-06 08:13:35 DEBUG update-status Authorization Failure. Authorization Failed: (http://172.18.0.109:35357/v3/tokens): The resource could not be found. (HTTP 404) (Request-ID: req-b6f8785c-890a-400b-a8cc-568a96cad6f1)
2019-06-06 08:13:35 ERROR juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 73, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-postgresql-1/charm/reactive/postgresql/wal_e.py", line 154, in ensure_swift_container
subprocess.check_call(cmd, universal_newlines=True)
File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/snap/bin/wal-e.envdir', '/etc/postgresql/10/main/wal-e.env', '/snap/bin/wal-e.swift', 'post', 'backup']' returned non-zero exit status 1.
2019-06-06 08:13:35 DEBUG update-status /var/lib/juju/agents/unit-postgresql-1/charm/reactive/postgresql/helpers.py:107: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
2019-06-06 08:13:35 DEBUG update-status return yaml.load(f)
2019-06-06 08:13:35 DEBUG update-status Traceback (most recent call last):
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/juju/agents/unit-postgresql-1/charm/hooks/update-status", line 22, in <module>
2019-06-06 08:13:35 DEBUG update-status main()
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 73, in main
2019-06-06 08:13:35 DEBUG update-status bus.dispatch(restricted=restricted_mode)
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 390, in dispatch
2019-06-06 08:13:35 DEBUG update-status _invoke(other_handlers)
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 359, in _invoke
2019-06-06 08:13:35 DEBUG update-status handler.invoke()
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/juju/agents/unit-postgresql-1/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 181, in invoke
2019-06-06 08:13:35 DEBUG update-status self._action(*args)
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/juju/agents/unit-postgresql-1/charm/reactive/postgresql/wal_e.py", line 154, in ensure_swift_container
2019-06-06 08:13:35 DEBUG update-status subprocess.check_call(cmd, universal_newlines=True)
2019-06-06 08:13:35 DEBUG update-status File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
2019-06-06 08:13:35 DEBUG update-status raise CalledProcessError(retcode, cmd)
2019-06-06 08:13:35 DEBUG update-status subprocess.CalledProcessError: Command '['/snap/bin/wal-e.envdir', '/etc/postgresql/10/main/wal-e.env', '/snap/bin/wal-e.swift', 'post', 'backup']' returned non-zero exit status 1.
2019-06-06 08:13:35 ERROR juju.worker.uniter.operation runhook.go:132 hook "update-status" failed: exit status 1
Running the following command:
$ juju run --unit postgresql/0 "charms.reactive -p set_flag postgresql. cluster. initial- check"
moves the charm forward, however, it fails with the following errors:
2019-06-06 08:13:35 DEBUG update-status Authorization Failure. Authorization Failed: (http:// 172.18. 0.109:35357/ v3/tokens): The resource could not be found. (HTTP 404) (Request-ID: req-b6f8785c- 890a-400b- a8cc-568a96cad6 f1) juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ __init_ _.py", line 73, in main dispatch( restricted= restricted_ mode) juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ bus.py" , line 390, in dispatch other_handlers) juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ bus.py" , line 359, in _invoke invoke( ) juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ bus.py" , line 181, in invoke _action( *args) juju/agents/ unit-postgresql -1/charm/ reactive/ postgresql/ wal_e.py" , line 154, in ensure_ swift_container check_call( cmd, universal_ newlines= True) python3. 6/subprocess. py", line 291, in check_call ror(retcode, cmd) CalledProcessEr ror: Command '['/snap/ bin/wal- e.envdir' , '/etc/postgresq l/10/main/ wal-e.env' , '/snap/ bin/wal- e.swift' , 'post', 'backup']' returned non-zero exit status 1.
2019-06-06 08:13:35 ERROR juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
subprocess.
File "/usr/lib/
raise CalledProcessEr
subprocess.
2019-06-06 08:13:35 DEBUG update-status /var/lib/ juju/agents/ unit-postgresql -1/charm/ reactive/ postgresql/ helpers. py:107: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https:/ /msg.pyyaml. org/load for full details. juju/agents/ unit-postgresql -1/charm/ hooks/update- status" , line 22, in <module> juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ __init_ _.py", line 73, in main restricted= restricted_ mode) juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ bus.py" , line 390, in dispatch other_handlers) juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ bus.py" , line 359, in _invoke juju/agents/ unit-postgresql -1/.venv/ lib/python3. 6/site- packages/ charms/ reactive/ bus.py" , line 181, in invoke juju/agents/ unit-postgresql -1/charm/ reactive/ postgresql/ wal_e.py" , line 154, in ensure_ swift_container check_call( cmd, universal_ newlines= True) python3. 6/subprocess. py", line 291, in check_call ror(retcode, cmd) CalledProcessEr ror: Command '['/snap/ bin/wal- e.envdir' , '/etc/postgresq l/10/main/ wal-e.env' , '/snap/ bin/wal- e.swift' , 'post', 'backup']' returned non-zero exit status 1. uniter. operation runhook.go:132 hook "update-status" failed: exit status 1
2019-06-06 08:13:35 DEBUG update-status return yaml.load(f)
2019-06-06 08:13:35 DEBUG update-status Traceback (most recent call last):
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/
2019-06-06 08:13:35 DEBUG update-status main()
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/
2019-06-06 08:13:35 DEBUG update-status bus.dispatch(
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/
2019-06-06 08:13:35 DEBUG update-status _invoke(
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/
2019-06-06 08:13:35 DEBUG update-status handler.invoke()
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/
2019-06-06 08:13:35 DEBUG update-status self._action(*args)
2019-06-06 08:13:35 DEBUG update-status File "/var/lib/
2019-06-06 08:13:35 DEBUG update-status subprocess.
2019-06-06 08:13:35 DEBUG update-status File "/usr/lib/
2019-06-06 08:13:35 DEBUG update-status raise CalledProcessEr
2019-06-06 08:13:35 DEBUG update-status subprocess.
2019-06-06 08:13:35 ERROR juju.worker.
which is most likely a different issue.