Merge lp:~verterok/charms/trusty/tanuki-spec-manager/conn-check-refresh-on-config-changed into lp:~tanuki/charms/trusty/tanuki-spec-manager/trunk

Proposed by Guillermo Gonzalez
Status: Merged
Approved by: Celso Providelo
Approved revision: 20
Merged at revision: 20
Proposed branch: lp:~verterok/charms/trusty/tanuki-spec-manager/conn-check-refresh-on-config-changed
Merge into: lp:~tanuki/charms/trusty/tanuki-spec-manager/trunk
Diff against target: 28 lines (+7/-0)
2 files modified
hooks/actions.py (+6/-0)
hooks/services.py (+1/-0)
To merge this branch: bzr merge lp:~verterok/charms/trusty/tanuki-spec-manager/conn-check-refresh-on-config-changed
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+268100@code.launchpad.net

Commit message

refresh conn-check relation data on config-changed (or any other hook)

Description of the change

refresh conn-check relation data on config-changed (or any other hook)

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

Thanks Guillermo.

Since some conn-check checks depend on service configuration (e.g. amqp) every time configuration changed, conn-check is also reconfigured.

[]

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/actions.py'
2--- hooks/actions.py 2015-08-13 14:17:12 +0000
3+++ hooks/actions.py 2015-08-14 15:36:58 +0000
4@@ -93,6 +93,12 @@
5 host.mkdir(LOG_DIR, WSGI_USER, WSGI_GROUP, perms=0o755)
6
7
8+def publish_conn_check_relation_data(service_name):
9+ cr = ConnCheckRelation()
10+ for rel in hookenv.relations_of_type('conn-check'):
11+ hookenv.relation_set(rel['__relid__'], **cr.provide_data())
12+
13+
14 class WebsiteRelation(helpers.HttpRelation):
15
16 def provide_data(self):
17
18=== modified file 'hooks/services.py'
19--- hooks/services.py 2015-08-11 13:10:49 +0000
20+++ hooks/services.py 2015-08-14 15:36:58 +0000
21@@ -27,6 +27,7 @@
22 source='upstart.conf',
23 target='/etc/init/spec-manager.conf'),
24 actions.write_db_config,
25+ actions.publish_conn_check_relation_data,
26 actions.log_start,
27 actions.nrpe_external_master_relation,
28 ],

Subscribers

People subscribed via source and target branches