Whilst deploying this charm as part of a system we got thos following hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-postgresql-0/.venv/lib/python3.5/site-packages/charms/reactive/__init__.py", line 72, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-postgresql-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 375, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-postgresql-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 351, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-postgresql-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 173, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-postgresql-0/charm/reactive/postgresql/client.py", line 100, in master_provides
db_relation_common(rel)
File "/var/lib/juju/agents/unit-postgresql-0/charm/reactive/postgresql/client.py", line 232, in db_relation_common
local['host'] = ingress_address(local.relname, local.relid)
File "/var/lib/juju/agents/unit-postgresql-0/charm/reactive/postgresql/client.py", line 346, in ingress_address
d = hookenv.network_get(endpoint, relid)
File "/var/lib/juju/agents/unit-postgresql-0/.venv/lib/python3.5/site-packages/charmhelpers/core/hookenv.py", line 929, in inner_translate_exc2
return f(*args, **kwargs)
File "/var/lib/juju/agents/unit-postgresql-0/.venv/lib/python3.5/site-packages/charmhelpers/core/hookenv.py", line 1143, in network_get
stderr=subprocess.STDOUT).decode('UTF-8').strip()
File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['network-get', 'db', '--format', 'yaml', '-r', 'db:4']' returned non-zero exit status 2
Manually running (juju-run) this command gives the output:
ERROR flag provided but not defined: -r
https://jujucharms.com/docs/2.3/developer-network-primitives does appear to suggest that this is a legal command, but it doesn't seem to work with juju versions before 2.3.
This is with cs:postgresql-170 fwiw