Merge ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:misc-nagios into ubuntu-mirror-charm:master

Proposed by Paul Collins
Status: Merged
Approved by: John Losito
Approved revision: 61af309a5737be0450986e18881bf0edcce538e4
Merged at revision: 5b8cb8f4ffba955b570efdaf2d83beb65130be76
Proposed branch: ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:misc-nagios
Merge into: ubuntu-mirror-charm:master
Diff against target: 45 lines (+5/-4)
2 files modified
files/check-mirror.sh (+2/-2)
hooks/hooks.py (+3/-2)
Reviewer Review Type Date Requested Status
John Losito (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+381200@code.launchpad.net

Commit message

configure_nrpe: reload nagios; check-mirror.sh: exit 2 so we get criticals

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
John Losito (jlosito) :
review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 5b8cb8f4ffba955b570efdaf2d83beb65130be76

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/check-mirror.sh b/files/check-mirror.sh
2index 78973d4..09c8b04 100755
3--- a/files/check-mirror.sh
4+++ b/files/check-mirror.sh
5@@ -12,7 +12,7 @@ set -e
6 if [ $# -lt 3 ] ; then
7 echo "./check_mirror.sh [urlhost] [role] [ipaddrs]"
8 echo "e.g., ./check_mirror.sh archive.ubuntu.com ubuntu 1.2.3.4 4.5.6.7 ..."
9- exit 1
10+ exit 2
11 fi
12
13 urlhost=$1 ; shift
14@@ -49,7 +49,7 @@ case ${role} in
15 ;;
16 *)
17 echo "Unknown mirror role, ${role}"
18- exit 1
19+ exit 2
20 esac
21
22 tmpsigned=${tmpdir}/$(basename ${signed})
23diff --git a/hooks/hooks.py b/hooks/hooks.py
24index cefbc5e..7e8af4f 100755
25--- a/hooks/hooks.py
26+++ b/hooks/hooks.py
27@@ -22,8 +22,6 @@ from charmhelpers.core.host import (
28 chownr,
29 lsb_release,
30 mkdir,
31- service_start,
32- service_stop,
33 service_reload,
34 service_restart,
35 symlink,
36@@ -688,6 +686,9 @@ def configure_nrpe():
37 write_file(os.path.join(nagios_etcdir, 'check_all_disks_promptcrit.cfg'),
38 check_all_disks)
39
40+ log("CHARM: Reloading nagios-nrpe-server")
41+ service_reload('nagios-nrpe-server')
42+
43
44 def configure_log_archiving():
45 settings = {}

Subscribers

People subscribed via source and target branches