Merge lp:~hloeung/ubuntu-repository-cache/no-emphemeral-nagios-disk-checks into lp:ubuntu-repository-cache

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: 280
Merged at revision: 280
Proposed branch: lp:~hloeung/ubuntu-repository-cache/no-emphemeral-nagios-disk-checks
Merge into: lp:ubuntu-repository-cache
Diff against target: 17 lines (+5/-1)
1 file modified
lib/ubuntu_repository_cache/storage.py (+5/-1)
To merge this branch: bzr merge lp:~hloeung/ubuntu-repository-cache/no-emphemeral-nagios-disk-checks
Reviewer Review Type Date Requested Status
Max Horlanchuk (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+387259@code.launchpad.net

Commit message

Don't ship out nagios checks when no ephemeral devices are used

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
Max Horlanchuk (mhorlanchuk) wrote :

+1

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

Change successfully merged at revision 280

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/ubuntu_repository_cache/storage.py'
2--- lib/ubuntu_repository_cache/storage.py 2020-05-07 05:26:37 +0000
3+++ lib/ubuntu_repository_cache/storage.py 2020-07-13 00:10:36 +0000
4@@ -205,8 +205,12 @@
5 def update_checks(nrpe_config):
6 '''Update nagios check for ephemeral storage space if present'''
7
8+ config = hookenv.config()
9+ if not config.get('ephemeral-devices'):
10+ return
11+
12 try:
13- LOG('Adding check for ephemeral stoage {}'.format(
14+ LOG('Adding check for ephemeral storage {}'.format(
15 unitdata.kv().get('ephemeral-mounts')),
16 hookenv.DEBUG)
17 except KeyError:

Subscribers

People subscribed via source and target branches