Merge lp:~verterok/charms/trusty/logstash/update-nrpe_on_config-changed into lp:~tanuki/charms/trusty/logstash/trunk

Proposed by Guillermo Gonzalez on 2015-09-08
Status: Merged
Approved by: Guillermo Gonzalez on 2015-09-08
Approved revision: 58
Merged at revision: 57
Proposed branch: lp:~verterok/charms/trusty/logstash/update-nrpe_on_config-changed
Merge into: lp:~tanuki/charms/trusty/logstash/trunk
Diff against target: 25 lines (+3/-1)
2 files modified
hooks/client-relation-changed (+2/-0)
hooks/config-changed (+1/-1)
To merge this branch: bzr merge lp:~verterok/charms/trusty/logstash/update-nrpe_on_config-changed
Reviewer Review Type Date Requested Status
Celso Providelo (community) 2015-09-08 Approve on 2015-09-08
Review via email: mp+270446@code.launchpad.net

Commit message

Call hooks/nrpe-external-master-relation-changed at the end of config-changed, and minor fix to client-relation-changed

Description of the change

Call hooks/nrpe-external-master-relation-changed at the end of config-changed, and minor fix to client-relation-changed

To post a comment you must log in.
Celso Providelo (cprov) wrote :

+1, yay, sane LS at last.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/client-relation-changed'
2--- hooks/client-relation-changed 2015-09-08 17:11:30 +0000
3+++ hooks/client-relation-changed 2015-09-08 20:10:04 +0000
4@@ -29,6 +29,8 @@
5 def write_config():
6 with open('host_cache', 'r') as f:
7 hosts = f.readlines()
8+ if not hosts:
9+ sys.exit(0)
10
11 # Use last host in list as it will be the most recently added
12 # and first host in list may not exist anymore! TODO fix that.
13
14=== modified file 'hooks/config-changed'
15--- hooks/config-changed 2015-09-08 17:11:30 +0000
16+++ hooks/config-changed 2015-09-08 20:10:04 +0000
17@@ -49,7 +49,7 @@
18 # Restart the service when configuration has changed.
19 subprocess.check_output(shlex.split('hooks/start'))
20
21- # TODO: should call update_nrpe_checks() here. See charmsupport/nrpe.py
22+ subprocess.check_output(shlex.split('hooks/nrpe-external-master-relation-changed'))
23
24
25 def copy_config():

Subscribers

People subscribed via source and target branches