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
=== modified file 'hooks/ceph.py'
--- hooks/ceph.py 2016-01-12 14:17:36 +0000
+++ hooks/ceph.py 2016-02-17 10:41:27 +0000
@@ -145,6 +145,7 @@
145145
146def wait_for_quorum():146def wait_for_quorum():
147 while not is_quorum():147 while not is_quorum():
148 log("Waiting for quorum to be reached")
148 time.sleep(3)149 time.sleep(3)
149150
150151
151152
=== modified file 'hooks/ceph_hooks.py'
--- hooks/ceph_hooks.py 2016-02-02 17:01:53 +0000
+++ hooks/ceph_hooks.py 2016-02-17 10:41:27 +0000
@@ -266,6 +266,7 @@
266 ceph.osdize(dev, config('osd-format'), get_osd_journal(),266 ceph.osdize(dev, config('osd-format'), get_osd_journal(),
267 reformat_osd(), config('ignore-device-errors'))267 reformat_osd(), config('ignore-device-errors'))
268 ceph.start_osds(get_devices())268 ceph.start_osds(get_devices())
269 ceph.wait_for_quorum()
269 notify_osds()270 notify_osds()
270 notify_radosgws()271 notify_radosgws()
271 notify_client()272 notify_client()
@@ -281,7 +282,8 @@
281282
282def notify_radosgws():283def notify_radosgws():
283 for relid in relation_ids('radosgw'):284 for relid in relation_ids('radosgw'):
284 radosgw_relation(relid)285 for unit in related_units(relid):
286 radosgw_relation(relid=relid, unit=unit)
285287
286288
287def notify_client():289def notify_client():
@@ -320,19 +322,20 @@
320322
321@hooks.hook('radosgw-relation-changed')323@hooks.hook('radosgw-relation-changed')
322@hooks.hook('radosgw-relation-joined')324@hooks.hook('radosgw-relation-joined')
323def radosgw_relation(relid=None):325def radosgw_relation(relid=None, unit=None):
324 # Install radosgw for admin tools326 # Install radosgw for admin tools
325 apt_install(packages=filter_installed_packages(['radosgw']))327 apt_install(packages=filter_installed_packages(['radosgw']))
326328 if not unit:
329 unit = remote_unit()
327 """Process broker request(s)."""330 """Process broker request(s)."""
328 if ceph.is_quorum():331 if ceph.is_quorum():
329 settings = relation_get(rid=relid)332 settings = relation_get(rid=relid, unit=unit)
330 if 'broker_req' in settings:333 if 'broker_req' in settings:
331 if not ceph.is_leader():334 if not ceph.is_leader():
332 log("Not leader - ignoring broker request", level=DEBUG)335 log("Not leader - ignoring broker request", level=DEBUG)
333 else:336 else:
334 rsp = process_requests(settings['broker_req'])337 rsp = process_requests(settings['broker_req'])
335 unit_id = remote_unit().replace('/', '-')338 unit_id = unit.replace('/', '-')
336 unit_response_key = 'broker-rsp-' + unit_id339 unit_response_key = 'broker-rsp-' + unit_id
337 log('mon cluster in quorum - providing radosgw with keys')340 log('mon cluster in quorum - providing radosgw with keys')
338 data = {341 data = {

Subscribers

People subscribed via source and target branches