Merge ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master into ~livepatch-charmers/charm-canonical-livepatch:master

Proposed by Barry Price
Status: Merged
Approved by: Haw Loeung
Approved revision: 0e63f436969e348e2348b240decb26e4f0914f64
Merged at revision: 257535a699d5d13f53dda4d78b286268da611227
Proposed branch: ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master
Merge into: ~livepatch-charmers/charm-canonical-livepatch:master
Diff against target: 20 lines (+2/-1)
2 files modified
files/check_canonical-livepatch.cron (+1/-1)
reactive/canonical_livepatch.py (+1/-0)
Reviewer Review Type Date Requested Status
Haw Loeung Approve
Review via email: mp+358613@code.launchpad.net

Commit message

Don't generate nagios checks or cron spam in containers (or on unsupported architectures)

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
Haw Loeung (hloeung) wrote :

LGTM, +1

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

Change successfully merged at revision 257535a699d5d13f53dda4d78b286268da611227

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/files/check_canonical-livepatch.cron b/files/check_canonical-livepatch.cron
index 6457c12..05d4515 100644
--- a/files/check_canonical-livepatch.cron
+++ b/files/check_canonical-livepatch.cron
@@ -1,2 +1,2 @@
1# check_canonical-livepatch1# check_canonical-livepatch
217,47 * * * * root /snap/bin/canonical-livepatch status > /var/lib/nagios/canonical-livepatch-status.txt217,47 * * * * root [ -x /snap/bin/canonical-livepatch ] && /snap/bin/canonical-livepatch status > /var/lib/nagios/canonical-livepatch-status.txt
diff --git a/reactive/canonical_livepatch.py b/reactive/canonical_livepatch.py
index 3f30019..533e5a7 100644
--- a/reactive/canonical_livepatch.py
+++ b/reactive/canonical_livepatch.py
@@ -248,6 +248,7 @@ def change_channel():
248# Set up Nagios checks when the nrpe-external-master subordinate is related248# Set up Nagios checks when the nrpe-external-master subordinate is related
249@when('nrpe-external-master.available')249@when('nrpe-external-master.available')
250@when_not('canonical-livepatch.nagios-setup.complete')250@when_not('canonical-livepatch.nagios-setup.complete')
251@when('canonical-livepatch.supported')
251def configure_nagios(nagios):252def configure_nagios(nagios):
252 if hookenv.hook_name() == 'update-status':253 if hookenv.hook_name() == 'update-status':
253 return254 return

Subscribers

People subscribed via source and target branches