You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App Version Status Scale Charm Channel Rev Exposed Message
cos-proxy n/a error 1 cos-proxy latest/stable 73 no hook failed: "dashboards-relation-broken"
Grafana
2024-09-02 14:34:50 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
2024-09-02 14:34:53 WARNING unit.cos-proxy/7.juju-log server.go:325 dashboards:699: 'app' expected but not received.
2024-09-02 14:34:53 WARNING unit.cos-proxy/7.juju-log server.go:325 dashboards:699: 'app_name' expected in snapshot but not found.
2024-09-02 14:34:53 ERROR unit.cos-proxy/7.juju-log server.go:325 dashboards:699: Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/./src/charm.py", line 643, in <module>
main(COSProxyCharm)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 544, in main
manager.run()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 520, in run
self._emit()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 509, in _emit
_emit_charm_event(self.charm, self.dispatcher.event_name)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 143, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 352, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 851, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 941, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 1685, in remove_dashboards
app_ids = _type_convert_stored(self._stored.id_mappings.get(event.app.name, "")) # type: ignore
AttributeError: 'NoneType' object has no attribute 'name'
Prometheus
2024-09-12 09:56:50 ERROR unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/./src/charm.py", line 643, in <module>
main(COSProxyCharm)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 544, in main
manager.run()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 520, in run
self._emit()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 509, in _emit
_emit_charm_event(self.charm, self.dispatcher.event_name)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 143, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 352, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 851, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 941, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/./src/charm.py", line 560, in _prometheus_target_relation_broken
self._handle_prometheus_alert_rule_files(RULES_DIR, event.app.name)
AttributeError: 'NoneType' object has no attribute 'name'
2024-09-12 09:56:50 ERROR juju.worker.uniter.operation runhook.go:180 hook "prometheus-target-relation-broken" (via hook dispatching script: dispatch) failed: exit status 1
2024-09-12 09:56:50 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
2024-09-12 10:00:46 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
2024-09-12 10:01:50 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
2024-09-12 10:01:53 WARNING unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: 'app' expected but not received.
2024-09-12 10:01:53 WARNING unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: 'app_name' expected in snapshot but not found.
2024-09-12 10:01:53 WARNING unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: 'app_name' expected in snapshot but not found.
2024-09-12 10:01:53 ERROR unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/./src/charm.py", line 643, in <module>
main(COSProxyCharm)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 544, in main
manager.run()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 520, in run
self._emit()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 509, in _emit
_emit_charm_event(self.charm, self.dispatcher.event_name)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 143, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 352, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 851, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 941, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/./src/charm.py", line 560, in _prometheus_target_relation_broken
self._handle_prometheus_alert_rule_files(RULES_DIR, event.app.name)
AttributeError: 'NoneType' object has no attribute 'name'
2024-09-12 10:01:54 ERROR juju.worker.uniter.operation runhook.go:180 hook "prometheus-target-relation-broken" (via hook dispatching script: dispatch) failed: exit status 1
2024-09-12 10:01:54 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
2024-09-12 10:05:44 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
2024-09-12 10:06:54 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
2024-09-12 10:06:57 WARNING unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: 'app' expected but not received.
2024-09-12 10:06:57 WARNING unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: 'app_name' expected in snapshot but not found.
2024-09-12 10:06:57 WARNING unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: 'app_name' expected in snapshot but not found.
2024-09-12 10:06:57 ERROR unit.cos-proxy/7.juju-log server.go:325 prometheus-target:700: Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/./src/charm.py", line 643, in <module>
main(COSProxyCharm)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 544, in main
manager.run()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 520, in run
self._emit()
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 509, in _emit
_emit_charm_event(self.charm, self.dispatcher.event_name)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/main.py", line 143, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 352, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 851, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/venv/ops/framework.py", line 941, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-cos-proxy-7/charm/./src/charm.py", line 560, in _prometheus_target_relation_broken
self._handle_prometheus_alert_rule_files(RULES_DIR, event.app.name)
AttributeError: 'NoneType' object has no attribute 'name'
2024-09-12 10:06:57 ERROR juju.worker.uniter.operation runhook.go:180 hook "prometheus-target-relation-broken" (via hook dispatching script: dispatch) failed: exit status 1
2024-09-12 10:06:57 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-broken" hook
The text was updated successfully, but these errors were encountered:
Via @pedrofragola.
When the prometheus relation is removed,
the charm goes into error state because
event.app
is None.cos-proxy-operator/src/charm.py
Lines 622 to 624 in 49eb7f0
Grafana
Prometheus
The text was updated successfully, but these errors were encountered: