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
1=== modified file 'hooks/swift_hooks.py'
2--- hooks/swift_hooks.py 2013-03-12 11:17:32 +0000
3+++ hooks/swift_hooks.py 2013-04-06 23:40:28 +0000
4@@ -111,13 +111,20 @@
5 msg = 'Broadcasting notification to all storage nodes that new '\
6 'ring is ready for consumption.'
7 utils.juju_log('INFO', msg)
8- www_dir = swift.WWW_DIR.split('/var/www/')[1]
9+ path = swift.WWW_DIR.split('/var/www/')[1]
10 trigger = uuid.uuid4()
11 swift_hash = swift.get_swift_hash()
12+
13+ if cluster.is_clustered():
14+ hostname = utils.config_get('vip')
15+ else:
16+ hostname = utils.unit_get('private-address')
17+
18+ rings_url = 'http://%s/%s' % (hostname, path)
19 # notify storage nodes that there is a new ring to fetch.
20 for relid in utils.relation_ids('swift-storage'):
21 utils.relation_set(rid=relid, swift_hash=swift_hash,
22- www_dir=www_dir, trigger=trigger)
23+ rings_url=rings_url, trigger=trigger)
24
25 swift.proxy_control('restart')
26
27
28=== modified file 'revision'
29--- revision 2013-03-21 18:29:07 +0000
30+++ revision 2013-04-06 23:40:28 +0000
31@@ -1,1 +1,1 @@
32-122
33+123

Subscribers

People subscribed via source and target branches