Merge lp:~gnuoy/charms/trusty/ceph/1517940 into lp:~openstack-charmers-archive/charms/trusty/ceph/next

Proposed by Liam Young
Status: Merged
Merged at revision: 134
Proposed branch: lp:~gnuoy/charms/trusty/ceph/1517940
Merge into: lp:~openstack-charmers-archive/charms/trusty/ceph/next
Diff against target: 58 lines (+9/-5)
2 files modified
hooks/ceph.py (+1/-0)
hooks/ceph_hooks.py (+8/-5)
To merge this branch: bzr merge lp:~gnuoy/charms/trusty/ceph/1517940
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+286278@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #731 ceph-next for gnuoy mp286278
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/731/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #638 ceph-next for gnuoy mp286278
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/638/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #285 ceph-next for gnuoy mp286278
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/285/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/ceph.py'
2--- hooks/ceph.py 2016-01-12 14:17:36 +0000
3+++ hooks/ceph.py 2016-02-17 10:41:27 +0000
4@@ -145,6 +145,7 @@
5
6 def wait_for_quorum():
7 while not is_quorum():
8+ log("Waiting for quorum to be reached")
9 time.sleep(3)
10
11
12
13=== modified file 'hooks/ceph_hooks.py'
14--- hooks/ceph_hooks.py 2016-02-02 17:01:53 +0000
15+++ hooks/ceph_hooks.py 2016-02-17 10:41:27 +0000
16@@ -266,6 +266,7 @@
17 ceph.osdize(dev, config('osd-format'), get_osd_journal(),
18 reformat_osd(), config('ignore-device-errors'))
19 ceph.start_osds(get_devices())
20+ ceph.wait_for_quorum()
21 notify_osds()
22 notify_radosgws()
23 notify_client()
24@@ -281,7 +282,8 @@
25
26 def notify_radosgws():
27 for relid in relation_ids('radosgw'):
28- radosgw_relation(relid)
29+ for unit in related_units(relid):
30+ radosgw_relation(relid=relid, unit=unit)
31
32
33 def notify_client():
34@@ -320,19 +322,20 @@
35
36 @hooks.hook('radosgw-relation-changed')
37 @hooks.hook('radosgw-relation-joined')
38-def radosgw_relation(relid=None):
39+def radosgw_relation(relid=None, unit=None):
40 # Install radosgw for admin tools
41 apt_install(packages=filter_installed_packages(['radosgw']))
42-
43+ if not unit:
44+ unit = remote_unit()
45 """Process broker request(s)."""
46 if ceph.is_quorum():
47- settings = relation_get(rid=relid)
48+ settings = relation_get(rid=relid, unit=unit)
49 if 'broker_req' in settings:
50 if not ceph.is_leader():
51 log("Not leader - ignoring broker request", level=DEBUG)
52 else:
53 rsp = process_requests(settings['broker_req'])
54- unit_id = remote_unit().replace('/', '-')
55+ unit_id = unit.replace('/', '-')
56 unit_response_key = 'broker-rsp-' + unit_id
57 log('mon cluster in quorum - providing radosgw with keys')
58 data = {

Subscribers

People subscribed via source and target branches