Merge lp:~james-page/charms/precise/ceph/fix-notify-clients into lp:~charmers/charms/precise/ceph/trunk

Proposed by James Page
Status: Merged
Merged at revision: 58
Proposed branch: lp:~james-page/charms/precise/ceph/fix-notify-clients
Merge into: lp:~charmers/charms/precise/ceph/trunk
Diff against target: 19 lines (+6/-4)
1 file modified
hooks/hooks.py (+6/-4)
To merge this branch: bzr merge lp:~james-page/charms/precise/ceph/fix-notify-clients
Reviewer Review Type Date Requested Status
Robert Ayres (community) Approve
Review via email: mp+161835@code.launchpad.net

Description of the change

This fixes up a hook error I noticed when a client relation is in place but none of the clients have actually appears on the relation.

To post a comment you must log in.
Revision history for this message
Robert Ayres (robert-ayres) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2013-03-12 16:30:06 +0000
+++ hooks/hooks.py 2013-05-01 15:04:25 +0000
@@ -255,10 +255,12 @@
255 utils.juju_log('INFO', 'Begin notify_client.')255 utils.juju_log('INFO', 'Begin notify_client.')
256256
257 for relid in utils.relation_ids('client'):257 for relid in utils.relation_ids('client'):
258 service_name = utils.relation_list(relid)[0].split('/')[0]258 units = utils.relation_list(relid)
259 utils.relation_set(key=ceph.get_named_key(service_name),259 if len(units) > 0:
260 auth=utils.config_get('auth-supported'),260 service_name = units[0].split('/')[0]
261 rid=relid)261 utils.relation_set(key=ceph.get_named_key(service_name),
262 auth=utils.config_get('auth-supported'),
263 rid=relid)
262264
263 utils.juju_log('INFO', 'End notify_client.')265 utils.juju_log('INFO', 'End notify_client.')
264266

Subscribers

People subscribed via source and target branches

to all changes: