Merge ~martin-hilton/charm-prometheus2:001-fix-storage-arguments into ~prometheus-charmers/charm-prometheus2:master

Proposed by Martin Hilton
Status: Merged
Approved by: Thomas Cuthbert
Approved revision: ff8510e342ea46a174cc734cf1f624ca749f9c19
Merged at revision: e36aecf7c383892bc6d8f0ce06b78f71104b57a8
Proposed branch: ~martin-hilton/charm-prometheus2:001-fix-storage-arguments
Merge into: ~prometheus-charmers/charm-prometheus2:master
Diff against target: 18 lines (+1/-2)
1 file modified
reactive/prometheus.py (+1/-2)
Reviewer Review Type Date Requested Status
Thomas Cuthbert (community) Approve
Review via email: mp+342723@code.launchpad.net

Commit message

Fix error with specifying the "storage.tsdb.path" flag twice when using juju storage.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Thomas Cuthbert (tcuthbert) wrote :

LGTM +1
I noticed that the storage path argument is different, did a bit of investigation and worked out that the command in 1.8 is actually different to `--storage.tsdb.path` so I am a little perplexed how this worked in the first place...

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision e36aecf7c383892bc6d8f0ce06b78f71104b57a8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/prometheus.py b/reactive/prometheus.py
2index 2f686b7..3085b2a 100644
3--- a/reactive/prometheus.py
4+++ b/reactive/prometheus.py
5@@ -156,13 +156,12 @@ def get_rule_files():
6
7
8 # TODO: once there's reactive support for storage hooks, convert off @hook()
9-@hook('metrics-{filesystem,block}-storage-attached')
10+@hook('metrics-filesystem-storage-attached')
11 def configure_storage():
12 storage_path = subprocess.check_output(
13 ['storage-get', 'location']).decode().strip()
14 kv = unitdata.kv()
15 kv.set('storage-path', storage_path)
16- runtime_args('--storage.tsdb.path', storage_path)
17 set_state('storage.configured')
18 set_state('prometheus.do-check-reconfig')
19

Subscribers

People subscribed via source and target branches