Merge lp:~james-page/charms/precise/ceph/cuttlefish into lp:~charmers/charms/precise/ceph/trunk

Proposed by James Page
Status: Merged
Approved by: Adam Gandelman
Approved revision: 63
Merged at revision: 60
Proposed branch: lp:~james-page/charms/precise/ceph/cuttlefish
Merge into: lp:~charmers/charms/precise/ceph/trunk
Diff against target: 26 lines (+7/-2)
1 file modified
hooks/hooks.py (+7/-2)
To merge this branch: bzr merge lp:~james-page/charms/precise/ceph/cuttlefish
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+170707@code.launchpad.net

Description of the change

Minor fix for ceph mon creation in ceph >= 0.61.3

ceph-mon --mkfs now requires that both /var/run/ceph and
/var/lib/ceph/mon/ceph-<hostname> are present prior to
being able to create a monfs.

To post a comment you must log in.
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Works for me, testing across the last 3 ceph versions and gets me going with 0.61.3.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2013-06-10 13:46:24 +0000
3+++ hooks/hooks.py 2013-06-20 21:40:30 +0000
4@@ -125,8 +125,9 @@
5
6 def bootstrap_monitor_cluster():
7 hostname = utils.get_unit_hostname()
8- done = '/var/lib/ceph/mon/ceph-{}/done'.format(hostname)
9- upstart = '/var/lib/ceph/mon/ceph-{}/upstart'.format(hostname)
10+ path = '/var/lib/ceph/mon/ceph-{}'.format(hostname)
11+ done = '{}/done'.format(path)
12+ upstart = '{}/upstart'.format(path)
13 secret = utils.config_get('monitor-secret')
14 keyring = '/var/lib/ceph/tmp/{}.mon.keyring'.format(hostname)
15
16@@ -134,6 +135,10 @@
17 utils.juju_log('INFO',
18 'bootstrap_monitor_cluster: mon already initialized.')
19 else:
20+ # Ceph >= 0.61.3 needs this for ceph-mon fs creation
21+ os.makedirs('/var/run/ceph', mode=0755)
22+ os.makedirs(path)
23+ # end changes for Ceph >= 0.61.3
24 try:
25 subprocess.check_call(['ceph-authtool', keyring,
26 '--create-keyring', '--name=mon.',

Subscribers

People subscribed via source and target branches

to all changes: