Merge ~afreiberger/charm-grafana:fix-test-14-race into charm-grafana:master

Proposed by Drew Freiberger
Status: Merged
Approved by: Peter Sabaini
Approved revision: 836056ee88e7d47cf0a3a21e2cb95b0bc5318dc3
Merged at revision: 288a04ed93f649cf5962402e020b8aa7f2a7c987
Proposed branch: ~afreiberger/charm-grafana:fix-test-14-race
Merge into: charm-grafana:master
Diff against target: 12 lines (+3/-0)
1 file modified
src/reactive/grafana.py (+3/-0)
Reviewer Review Type Date Requested Status
Peter Sabaini Approve
Xiyue Wang Approve
Review via email: mp+397120@code.launchpad.net

Commit message

Resolve race between port change and dashboard ingestion

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

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

Revision history for this message
Xiyue Wang (ziyiwang) wrote :

LGTM

review: Approve
Revision history for this message
Peter Sabaini (peter-sabaini) wrote :

lgtm

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

Change successfully merged at revision 288a04ed93f649cf5962402e020b8aa7f2a7c987

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/reactive/grafana.py b/src/reactive/grafana.py
2index f9e9a94..31c364b 100644
3--- a/src/reactive/grafana.py
4+++ b/src/reactive/grafana.py
5@@ -333,6 +333,9 @@ def config_changed():
6 remove_state("grafana.admin_password.set")
7 if config.changed("install_file") and config.get("install_file"):
8 remove_state("grafana.installed")
9+ if config.changed("port"):
10+ # must restart grafana after port-change before updating dashboards
11+ remove_state("grafana.started")
12 remove_state("grafana.nagios-setup.completed")
13
14

Subscribers

People subscribed via source and target branches