Merge lp:~xfactor973/charm-helpers/ceph-pool-replicas into lp:charm-helpers

Proposed by Chris Holcombe
Status: Merged
Merged at revision: 566
Proposed branch: lp:~xfactor973/charm-helpers/ceph-pool-replicas
Merge into: lp:charm-helpers
Diff against target: 26 lines (+5/-0)
2 files modified
charmhelpers/contrib/storage/linux/ceph.py (+4/-0)
tests/contrib/storage/test_linux_ceph.py (+1/-0)
To merge this branch: bzr merge lp:~xfactor973/charm-helpers/ceph-pool-replicas
Reviewer Review Type Date Requested Status
Ryan Beisner (community) Approve
Chris MacNaughton (community) Approve
Jason Hobbs (community) Approve
Review via email: mp+291827@code.launchpad.net

Description of the change

The change adds in a call to update the ceph pool once the pool creation is finished. By not having this call I broke the cinder and glance charm. The pools were getting created with the wrong number of replicas and never allowed those placement groups in the pool to go healthy in Oil testing.

To post a comment you must log in.
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

+1 - I tested this change and it fixed the problem for me. I was able to successfully upload an image to glance.

review: Approve
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

+11 - Looks good to me

review: Approve
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Thanks for the fix, and thanks for verifying in OIL. Will merge, then storage charmers will need to resync and propose changes ASAP so we can revalidate in 16.04 pre-release tests.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/storage/linux/ceph.py'
--- charmhelpers/contrib/storage/linux/ceph.py 2016-03-09 18:23:35 +0000
+++ charmhelpers/contrib/storage/linux/ceph.py 2016-04-13 21:49:16 +0000
@@ -221,6 +221,10 @@
221 self.name, str(self.pg_num)]221 self.name, str(self.pg_num)]
222 try:222 try:
223 check_call(cmd)223 check_call(cmd)
224 # Set the pool replica size
225 update_pool(client=self.service,
226 pool=self.name,
227 settings={'size': str(self.replicas)})
224 except CalledProcessError:228 except CalledProcessError:
225 raise229 raise
226230
227231
=== modified file 'tests/contrib/storage/test_linux_ceph.py'
--- tests/contrib/storage/test_linux_ceph.py 2016-03-09 18:23:35 +0000
+++ tests/contrib/storage/test_linux_ceph.py 2016-04-13 21:49:16 +0000
@@ -234,6 +234,7 @@
234234
235 self.check_call.assert_has_calls([235 self.check_call.assert_has_calls([
236 call(['ceph', '--id', 'admin', 'osd', 'pool', 'create', 'test', str(200)]),236 call(['ceph', '--id', 'admin', 'osd', 'pool', 'create', 'test', str(200)]),
237 call(['ceph', '--id', 'admin', 'osd', 'pool', 'set', 'test', 'size', str(3)])
237 ])238 ])
238239
239 @patch.object(ceph_utils, 'get_osds')240 @patch.object(ceph_utils, 'get_osds')

Subscribers

People subscribed via source and target branches