Merge ~nick-moffitt/content-cache-charm:hack-around-upgrade-bug into content-cache-charm:master

Proposed by Nick Moffitt
Status: Merged
Approved by: Nick Moffitt
Approved revision: cd740b7392e342ded8ba95c7b31216944fad4f97
Merged at revision: f9ea69395561e59898f7fe9d54d8097bf2965b04
Proposed branch: ~nick-moffitt/content-cache-charm:hack-around-upgrade-bug
Merge into: content-cache-charm:master
Diff against target: 19 lines (+8/-0)
1 file modified
reactive/content_cache.py (+8/-0)
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+365527@code.launchpad.net
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
Stuart Bishop (stub) wrote :

Ok, since this was tested, but would have been more correct in a @hook('upgrade-charm') handler.

review: Approve
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

It actually is in @@ -25,6 +25,14 @@ def upgrade_charm(): so we're all good here.

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

Change successfully merged at revision f9ea69395561e59898f7fe9d54d8097bf2965b04

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/content_cache.py b/reactive/content_cache.py
2index e137694..934563d 100644
3--- a/reactive/content_cache.py
4+++ b/reactive/content_cache.py
5@@ -25,6 +25,14 @@ def upgrade_charm():
6 reactive.clear_flag('content_cache.nginx.configured')
7 reactive.clear_flag('nagios-nrpe.configured')
8
9+ # Work around for
10+ # https://github.com/cmars/nrpe-external-master-interface/issues/12
11+ n = reactive.endpoint_from_name('nrpe-external-master')
12+ if n is None:
13+ hookenv.log('no nrpe-external-master relation to force')
14+ else:
15+ reactive.set_flag('nrpe-external-master.available')
16+
17
18 @reactive.when_not('content_cache.installed')
19 def install():

Subscribers

People subscribed via source and target branches