Merge lp:~brad-marshall/charms/trusty/nrpe-external-master/fix-rsyncd-conf into lp:charms/nrpe-external-master

Proposed by Brad Marshall
Status: Superseded
Proposed branch: lp:~brad-marshall/charms/trusty/nrpe-external-master/fix-rsyncd-conf
Merge into: lp:charms/nrpe-external-master
Diff against target: 89 lines (+19/-31)
4 files modified
files/rsyncd.conf (+12/-0)
hooks/config-changed (+2/-11)
hooks/install (+5/-11)
templates/rsyncd.conf.tmpl (+0/-9)
To merge this branch: bzr merge lp:~brad-marshall/charms/trusty/nrpe-external-master/fix-rsyncd-conf
Reviewer Review Type Date Requested Status
JuanJo Ciarlante (community) Needs Fixing
Review via email: mp+241482@code.launchpad.net

This proposal has been superseded by a proposal from 2014-11-17.

Description of the change

Add support for a /etc/rsync-juju.d file, to allow charms to drop fragments in place. Required for the swift charm to have a working rsync.

To post a comment you must log in.
Revision history for this message
JuanJo Ciarlante (jjo) wrote :

See inline comments, LGTM afterwards.

review: Needs Fixing
36. By Brad Marshall

[bradm] Added timeout to rsyncd.conf

37. By Brad Marshall

[bradm] Removed puppet header from nagios_plugin module

38. By Brad Marshall

[bradm] Added nagios checks for monitoring upstart and sysvinit daemons

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'files/rsyncd.conf'
2--- files/rsyncd.conf 1970-01-01 00:00:00 +0000
3+++ files/rsyncd.conf 2014-11-17 03:52:40 +0000
4@@ -0,0 +1,12 @@
5+#------------------------------------------------
6+# This file is juju managed
7+#------------------------------------------------
8+
9+uid = nobody
10+gid = nogroup
11+pid file = /var/run/rsyncd.pid
12+syslog facility = daemon
13+socket options = SO_KEEPALIVE
14+timeout = 7200
15+
16+&include /etc/rsync-juju.d
17
18=== modified file 'hooks/config-changed'
19--- hooks/config-changed 2014-10-08 05:42:32 +0000
20+++ hooks/config-changed 2014-11-17 03:52:40 +0000
21@@ -26,18 +26,9 @@
22 export NAGIOS_ADDRESS_TYPE=$(config-get nagios_address_type)
23 cheetah fill --env --oext compiled templates/nrpe.cfg.tmpl
24 cp templates/nrpe.cfg.compiled /etc/nagios/nrpe.cfg
25-if [[ -d /etc/rsyncd.d ]]; then
26- export RSYNC_MODULE_ONLY=1
27-else
28- export RSYNC_MODULE_ONLY=0
29-fi
30 cheetah fill --env --oext compiled templates/rsyncd.conf.tmpl
31-if [[ -d /etc/rsyncd.d ]]; then
32- cp templates/rsyncd.conf.compiled /etc/rsyncd.d/010-nrpe-external-master
33- concat_rsync_fragments || true
34-else
35- cp templates/rsyncd.conf.compiled /etc/rsyncd.conf
36-fi
37+mkdir -p /etc/rsync-juju.d
38+cp templates/rsyncd.conf.compiled /etc/rsync-juju.d/010-nrpe-external-master.conf
39
40 #-----------------------------------------------------
41 # Standard Checks
42
43=== modified file 'hooks/install'
44--- hooks/install 2014-03-11 13:57:58 +0000
45+++ hooks/install 2014-11-17 03:52:40 +0000
46@@ -15,17 +15,11 @@
47 ln -fs /usr/lib/nagios/plugins/nagios_plugin.py /usr/local/lib/nagios/plugins/nagios_plugin.py
48
49 cp files/default_rsync /etc/default/rsync
50-if [[ -d /etc/rsyncd.d ]]; then
51- export RSYNC_MODULE_ONLY=1
52-else
53- export RSYNC_MODULE_ONLY=0
54-fi
55+cp files/rsyncd.conf /etc/rsyncd.conf
56+
57 export NAGIOS_MASTER=$(config-get nagios_master)
58 cheetah fill --env --oext compiled templates/rsyncd.conf.tmpl
59-if [[ -d /etc/rsyncd.d ]]; then
60- cp templates/rsyncd.conf.compiled /etc/rsyncd.d/010-nrpe-external-master
61- concat_rsync_fragments || true
62-else
63- cp templates/rsyncd.conf.compiled /etc/rsyncd.conf
64-fi
65+mkdir -p /etc/rsync-juju.d
66+cp templates/rsyncd.conf.compiled /etc/rsync-juju.d/010-nrpe-external-master
67+
68 service rsync restart
69
70=== modified file 'templates/rsyncd.conf.tmpl'
71--- templates/rsyncd.conf.tmpl 2012-11-26 04:27:06 +0000
72+++ templates/rsyncd.conf.tmpl 2014-11-17 03:52:40 +0000
73@@ -1,16 +1,7 @@
74-#if $RSYNC_MODULE_ONLY == "0"
75 #------------------------------------------------------------
76 # This file is managed by Juju.
77 #------------------------------------------------------------
78
79-uid = nobody
80-gid = nogroup
81-max connections = 25
82-syslog facility = daemon
83-socket options = SO_KEEPALIVE
84-timeout = 7200
85-#end if
86-
87 [external-nagios]
88 path = /var/lib/nagios/export/
89 comment = External Nagios Node configs

Subscribers

People subscribed via source and target branches

to all changes: