Hi there,
I tried to use the a bundle.yaml file to deploy Mattermost + PostgreSQL together, but failed.
First, I deployed them manually following the Mattermost docs and used the juju export-bundle > file.yaml
command to generate a Bundle file.
Later, I removed the applications and tried to deploy using the command juju deploy file.yaml
and got the following error:
$ juju debug-log
application-postgresql: 15:34:09 ERROR unit.postgresql/8.juju-log db:11: Uncaught exception while in charm code:
Traceback (most recent call last):
File "./src/charm.py", line 237, in <module>
ops.main.main(PostgreSQLCharm, use_juju_for_storage=True)
File "/var/lib/juju/agents/unit-postgresql-8/charm/venv/ops/main.py", line 402, in main
_emit_charm_event(charm, dispatcher.event_name)
File "/var/lib/juju/agents/unit-postgresql-8/charm/venv/ops/main.py", line 140, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-postgresql-8/charm/venv/ops/framework.py", line 278, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-postgresql-8/charm/venv/ops/framework.py", line 722, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-postgresql-8/charm/venv/ops/framework.py", line 767, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-postgresql-8/charm/src/clientrel.py", line 115, in on_db_relation_changed
req = _ClientRequests(event)
File "/var/lib/juju/agents/unit-postgresql-8/charm/src/clientrel.py", line 234, in __init__
buckets = [event.relation.data[event.app]]
File "/var/lib/juju/agents/unit-postgresql-8/charm/venv/ops/model.py", line 699, in __getitem__
return self._data[key]
KeyError: <ops.model.Application mattermost>
application-postgresql: 15:34:09 ERROR juju.worker.caasoperator.uniter.postgresql/8.operation hook "db-relation-changed" (via hook dispatching script: dispatch) failed: exit status 1
application-postgresql: 15:34:09 INFO juju.worker.caasoperator.uniter.postgresql/8 awaiting error resolution for "relation-changed" hook
Even if I nuke the whole cluster and try to deploy from the Bundle file from scratch, I got the same error.
I’m using Kind as a K8s cluster and Juju v2.9-rc6.