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
=== modified file 'hooks/actions.py'
--- hooks/actions.py 2015-08-13 14:17:12 +0000
+++ hooks/actions.py 2015-08-14 15:36:58 +0000
@@ -93,6 +93,12 @@
93 host.mkdir(LOG_DIR, WSGI_USER, WSGI_GROUP, perms=0o755)93 host.mkdir(LOG_DIR, WSGI_USER, WSGI_GROUP, perms=0o755)
9494
9595
96def publish_conn_check_relation_data(service_name):
97 cr = ConnCheckRelation()
98 for rel in hookenv.relations_of_type('conn-check'):
99 hookenv.relation_set(rel['__relid__'], **cr.provide_data())
100
101
96class WebsiteRelation(helpers.HttpRelation):102class WebsiteRelation(helpers.HttpRelation):
97103
98 def provide_data(self):104 def provide_data(self):
99105
=== modified file 'hooks/services.py'
--- hooks/services.py 2015-08-11 13:10:49 +0000
+++ hooks/services.py 2015-08-14 15:36:58 +0000
@@ -27,6 +27,7 @@
27 source='upstart.conf',27 source='upstart.conf',
28 target='/etc/init/spec-manager.conf'),28 target='/etc/init/spec-manager.conf'),
29 actions.write_db_config,29 actions.write_db_config,
30 actions.publish_conn_check_relation_data,
30 actions.log_start,31 actions.log_start,
31 actions.nrpe_external_master_relation,32 actions.nrpe_external_master_relation,
32 ],33 ],

Subscribers

People subscribed via source and target branches