Dashboards can only be registered once unless charm is upgraded

Bug #1977624 reported by Paul Goins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Prometheus libvirt exporter charm
New
Undecided
Unassigned

Bug Description

I believe I've found a bug regarding dashboard registration. This prevents both registration with multiple grafana apps via a "dashboards" relation, and causes problems if it is necessary to redeploy a grafana unit or app.

The bug is likely caused by this clause protecting the register_grafana_dashboards() function:

  @when_all("leadership.is_leader", "endpoint.dashboards.joined")
  @when_not("libvirt-exporter.dashboard-registered") # <-- Here is where I think the bug occurs
  def register_grafana_dashboards():

The libvirt-exporter.dashboard-registered flag only gets cleared on upgrade-charm hooks.

The workaround for this is likely:

  juju exec -u prometheus-libvirt-exporter/leader 'charms.reactive clear_flag libvirt-exporter.dashboard-registered'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.