Merge lp:~gandelman-a/charms/precise/swift-proxy/ring_files_via_vip into lp:~openstack-charmers/charms/precise/swift-proxy/ha-support

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 45
Proposed branch: lp:~gandelman-a/charms/precise/swift-proxy/ring_files_via_vip
Merge into: lp:~openstack-charmers/charms/precise/swift-proxy/ha-support
Diff against target: 33 lines (+10/-3)
2 files modified
hooks/swift_hooks.py (+9/-2)
revision (+1/-1)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/swift-proxy/ring_files_via_vip
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+157530@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/swift_hooks.py'
--- hooks/swift_hooks.py 2013-03-12 11:17:32 +0000
+++ hooks/swift_hooks.py 2013-04-06 23:40:28 +0000
@@ -111,13 +111,20 @@
111 msg = 'Broadcasting notification to all storage nodes that new '\111 msg = 'Broadcasting notification to all storage nodes that new '\
112 'ring is ready for consumption.'112 'ring is ready for consumption.'
113 utils.juju_log('INFO', msg)113 utils.juju_log('INFO', msg)
114 www_dir = swift.WWW_DIR.split('/var/www/')[1]114 path = swift.WWW_DIR.split('/var/www/')[1]
115 trigger = uuid.uuid4()115 trigger = uuid.uuid4()
116 swift_hash = swift.get_swift_hash()116 swift_hash = swift.get_swift_hash()
117
118 if cluster.is_clustered():
119 hostname = utils.config_get('vip')
120 else:
121 hostname = utils.unit_get('private-address')
122
123 rings_url = 'http://%s/%s' % (hostname, path)
117 # notify storage nodes that there is a new ring to fetch.124 # notify storage nodes that there is a new ring to fetch.
118 for relid in utils.relation_ids('swift-storage'):125 for relid in utils.relation_ids('swift-storage'):
119 utils.relation_set(rid=relid, swift_hash=swift_hash,126 utils.relation_set(rid=relid, swift_hash=swift_hash,
120 www_dir=www_dir, trigger=trigger)127 rings_url=rings_url, trigger=trigger)
121128
122 swift.proxy_control('restart')129 swift.proxy_control('restart')
123130
124131
=== modified file 'revision'
--- revision 2013-03-21 18:29:07 +0000
+++ revision 2013-04-06 23:40:28 +0000
@@ -1,1 +1,1 @@
11221123

Subscribers

People subscribed via source and target branches