Closed mmanciop closed 2 years ago
The same happens here.
Traceback (most recent call last):
File "./src/charm.py", line 260, in <module>
main(COSProxyCharm)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/venv/ops/main.py", line 426, in main
_emit_charm_event(charm, dispatcher.event_name)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/venv/ops/main.py", line 142, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/venv/ops/framework.py", line 276, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/venv/ops/framework.py", line 736, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/venv/ops/framework.py", line 783, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 1028, in update_dashboards
self._upset_dashboards_on_event(event)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 1032, in _upset_dashboards_on_event
dashboards = self._handle_reactive_dashboards(event)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 1149, in _handle_reactive_dashboards
t = self._strip_existing_datasources(t)
File "/var/lib/juju/agents/unit-cos-proxy-10/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 1095, in _strip_existing_datasources
dash = template["dashboard"]
KeyError: 'dashboard'
unit-cos-proxy-10: [13:52:36](https://www.youtube.com/watch?v=iQ99jYPQao0&t=43200s) ERROR juju.worker.uniter.operation hook "dashboards-relation-changed" (via hook dispatching script: dispatch) failed: exit status 1```
We will never be able to solve this as the dashboard is not transmitted over the relation, but rather just a "enable this" command.
The proper solution here would be for the ceph-dashboard charm to transmit their dashboard, just as all other charms do.
Rather vanilla setup imaginable with Ceph running on LXD:
Error trace as follows: