Merge lp:~xfactor973/charm-helpers/ceph-configkey-bugfix into lp:charm-helpers

Proposed by Chris Holcombe
Status: Merged
Merged at revision: 538
Proposed branch: lp:~xfactor973/charm-helpers/ceph-configkey-bugfix
Merge into: lp:charm-helpers
Diff against target: 76 lines (+8/-8)
2 files modified
charmhelpers/contrib/storage/linux/ceph.py (+4/-4)
tests/contrib/storage/test_linux_ceph.py (+4/-4)
To merge this branch: bzr merge lp:~xfactor973/charm-helpers/ceph-configkey-bugfix
Reviewer Review Type Date Requested Status
Charles Butler (community) Approve
Review via email: mp+288146@code.launchpad.net

Description of the change

I messed up the ceph commands on the config-key set/get/del There's an extra ceph parameter in there that shouldn't be there.

To post a comment you must log in.
Revision history for this message
Charles Butler (lazypower) wrote :

+1 LGTM

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-02 18:16:42 +0000
3+++ charmhelpers/contrib/storage/linux/ceph.py 2016-03-04 18:17:10 +0000
4@@ -271,7 +271,7 @@
5 try:
6 mon_status = check_output(
7 ['ceph', '--id', service,
8- 'ceph', 'mon_status', '--format=json'])
9+ 'mon_status', '--format=json'])
10 try:
11 return json.loads(mon_status)
12 except ValueError as v:
13@@ -321,7 +321,7 @@
14 try:
15 check_output(
16 ['ceph', '--id', service,
17- 'ceph', 'config-key', 'del', str(key)])
18+ 'config-key', 'del', str(key)])
19 except CalledProcessError as e:
20 log("Monitor config-key put failed with message: {}".format(
21 e.output))
22@@ -339,7 +339,7 @@
23 try:
24 check_output(
25 ['ceph', '--id', service,
26- 'ceph', 'config-key', 'put', str(key), str(value)])
27+ 'config-key', 'put', str(key), str(value)])
28 except CalledProcessError as e:
29 log("Monitor config-key put failed with message: {}".format(
30 e.output))
31@@ -356,7 +356,7 @@
32 try:
33 output = check_output(
34 ['ceph', '--id', service,
35- 'ceph', 'config-key', 'get', str(key)])
36+ 'config-key', 'get', str(key)])
37 return output
38 except CalledProcessError as e:
39 log("Monitor config-key get failed with message: {}".format(
40
41=== modified file 'tests/contrib/storage/test_linux_ceph.py'
42--- tests/contrib/storage/test_linux_ceph.py 2016-03-02 18:16:42 +0000
43+++ tests/contrib/storage/test_linux_ceph.py 2016-03-04 18:17:10 +0000
44@@ -414,13 +414,13 @@
45
46 def test_set_monitor_key(self):
47 cmd = ['ceph', '--id', 'admin',
48- 'ceph', 'config-key', 'put', 'foo', 'bar']
49+ 'config-key', 'put', 'foo', 'bar']
50 ceph_utils.monitor_key_set(service='admin', key='foo', value='bar')
51 self.check_output.assert_called_with(cmd)
52
53 def test_get_monitor_key(self):
54 cmd = ['ceph', '--id', 'admin',
55- 'ceph', 'config-key', 'get', 'foo']
56+ 'config-key', 'get', 'foo']
57 ceph_utils.monitor_key_get(service='admin', key='foo')
58 self.check_output.assert_called_with(cmd)
59
60@@ -449,7 +449,7 @@
61 def test_delete_monitor_key(self):
62 ceph_utils.monitor_key_delete(service='admin', key='foo')
63 cmd = ['ceph', '--id', 'admin',
64- 'ceph', 'config-key', 'del', 'foo']
65+ 'config-key', 'del', 'foo']
66 self.check_output.assert_called_with(cmd)
67
68 def test_delete_monitor_key_failed(self):
69@@ -463,7 +463,7 @@
70 def test_get_monmap(self):
71 self.check_output.return_value = MONMAP_DUMP
72 cmd = ['ceph', '--id', 'admin',
73- 'ceph', 'mon_status', '--format=json']
74+ 'mon_status', '--format=json']
75 ceph_utils.get_mon_map(service='admin')
76 self.check_output.assert_called_with(cmd)
77

Subscribers

People subscribed via source and target branches