Using custom-rules requires manually touching a file

Bug #1845329 reported by Andrea Ieri
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Prometheus2 charm
Fix Released
Medium
Unassigned

Bug Description

How to reproduce:
* deploy prometheus with its default configuration
* load some rules with `juju config prometheus custom-rules="$(cat blackbox.rules)"`

Result:
* the config-changed hook will fail because `/snap/bin/prometheus.promtool check config /var/snap/prometheus/current/prometheus.yml` will fail with:

Checking /var/snap/prometheus/current/prometheus.yml
  FAILED: "/var/snap/prometheus/current/custom.rules" does not point to an existing file

Workaround:
* juju ssh prometheus -- sudo touch /var/snap/prometheus/current/custom.rules

Xav Paice (xavpaice)
Changed in charm-prometheus2:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Linda Guo (lihuiguo) wrote :

This bug had already been fixed:

$ juju ssh prometheus2/0 ls /var/snap/prometheus/current/
daemon_arguments generic.rules prometheus.yml promreg

$ juju config prometheus2 custom-rules="$(cat test.rules)"

$ juju ssh prometheus2/0 ls /var/snap/prometheus/current/
custom.rules daemon_arguments generic.rules prometheus.yml promreg

Changed in charm-prometheus2:
status: Triaged → Fix Released
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.