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
1=== modified file 'charmhelpers/contrib/storage/linux/ceph.py'
2--- charmhelpers/contrib/storage/linux/ceph.py 2016-03-09 18:23:35 +0000
3+++ charmhelpers/contrib/storage/linux/ceph.py 2016-04-13 21:49:16 +0000
4@@ -221,6 +221,10 @@
5 self.name, str(self.pg_num)]
6 try:
7 check_call(cmd)
8+ # Set the pool replica size
9+ update_pool(client=self.service,
10+ pool=self.name,
11+ settings={'size': str(self.replicas)})
12 except CalledProcessError:
13 raise
14
15
16=== modified file 'tests/contrib/storage/test_linux_ceph.py'
17--- tests/contrib/storage/test_linux_ceph.py 2016-03-09 18:23:35 +0000
18+++ tests/contrib/storage/test_linux_ceph.py 2016-04-13 21:49:16 +0000
19@@ -234,6 +234,7 @@
20
21 self.check_call.assert_has_calls([
22 call(['ceph', '--id', 'admin', 'osd', 'pool', 'create', 'test', str(200)]),
23+ call(['ceph', '--id', 'admin', 'osd', 'pool', 'set', 'test', 'size', str(3)])
24 ])
25
26 @patch.object(ceph_utils, 'get_osds')

Subscribers

People subscribed via source and target branches