dashboards from relations require that charm-prometheus2 be deployed as "prometheus"

Bug #1891943 reported by Drew Freiberger on 2020-08-17
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Grafana Charm
High
Unassigned

Bug Description

To reproduce,

juju deploy ubuntu
juju deploy telegraf
juju deploy prometheus2
juju deploy grafana
juju add-relation ubuntu telegraf
juju add-relation prometheus2:grafana-source grafana
juju add-relation telegraf prometheus2:target
juju add-relation telegraf:dashboards grafana

Go to grafana unit ip:3000 and click on the juju-telegraf Telegraf Host Metrics dashboard and notice that the warning says:

"Template variables could not be initialized: Datasource named prometheus - Juju generated source was not found"

To resolve, re-deploy prometheus2 with name "prometheus".
juju deploy cs:prometheus2 prometheus

Changed in charm-grafana:
importance: Undecided → High
assignee: nobody → David O Neill (dmzoneill)
David O Neill (dmzoneill) wrote :
Download full text (5.2 KiB)

Work on this is currently blocked by promehtus2 build error

unit-prometheus2-5: 09:53:21 DEBUG juju.worker.uniter.runner starting jujuc server {unix @/var/lib/juju/agents/unit-prometheus2-5/agent.socket <nil>}
unit-prometheus2-5: 09:53:22 DEBUG jujuc running hook tool "juju-log"
unit-prometheus2-5: 09:53:22 INFO unit.prometheus2/5.juju-log Reactive main running for hook install
unit-prometheus2-5: 09:53:22 DEBUG jujuc running hook tool "juju-log"
unit-prometheus2-5: 09:53:22 ERROR unit.prometheus2/5.juju-log Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 71, in main
    bus.discover()
  File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 426, in discover
    _register_handlers_from_file(search_path, filepath)
  File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 466, in _register_handlers_from_file
    _load_module(root, filepath)
  File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 444, in _load_module
    return importlib.import_module(package + module)
  File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/var/lib/juju/agents/unit-prometheus2-5/charm/hooks/relations/prometheus/operator.py", line 53, in <module>
    from ops.framework import EventBase, ObjectEvents, EventSource, Object, StoredState
ModuleNotFoundError: No module named 'ops'

unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install Traceback (most recent call last):
unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install File "/var/lib/juju/agents/unit-prometheus2-5/charm/hooks/install", line 22, in <module>
unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install main()
unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 71, in main
unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install bus.discover()
unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 426, in discover
unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install _register_handlers_from_file(search_path, filepath)
unit-prometheus2-5: 09:53:22 DEBUG unit.prometheus2/5.install File "/var/lib/juju/agents/unit-prometheus2-5/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", l...

Read more...

Changed in charm-grafana:
assignee: David O Neill (dmzoneill) → nobody
Jose Guedez (jfguedez) on 2021-02-15
Changed in charm-grafana:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers