diff --git a/README.md b/README.md index c8c7af7..9fac824 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ hook to wait for all three nodes to come up, and then write their addresses to ceph.conf in the "mon host" parameter. After we initialize the monitor cluster a quorum forms quickly, and OSD bringup proceeds. -The osds use so-called "OSD hotplugging". **ceph-disk-prepare** is used to +The osds use so-called "OSD hotplugging". **ceph-disk prepare** is used to create the filesystems with a special GPT partition type. *udev* is set up to mount such filesystems and start the osd daemons as their storage becomes visible to the system (or after `udevadm trigger`). diff --git a/charm-helpers-hooks.yaml b/charm-helpers-hooks.yaml index eeee6f8..3177ba1 100644 --- a/charm-helpers-hooks.yaml +++ b/charm-helpers-hooks.yaml @@ -9,5 +9,6 @@ include: - ceph - payload.execd - contrib.openstack.alternatives + - contrib.openstack.utils - contrib.network.ip - contrib.charmsupport diff --git a/files/upstart/ceph-hotplug.conf b/files/upstart/ceph-hotplug.conf index 7020452..d82e7c8 100644 --- a/files/upstart/ceph-hotplug.conf +++ b/files/upstart/ceph-hotplug.conf @@ -8,4 +8,4 @@ stop on runlevel [!2345] task instance $DEVNAME -exec /usr/sbin/ceph-disk-activate --mount -- "$DEVNAME" +exec /usr/sbin/ceph-disk activate --mount -- "$DEVNAME" diff --git a/hooks/ceph.py b/hooks/ceph.py index 1d77030..ff3a7a4 100644 --- a/hooks/ceph.py +++ b/hooks/ceph.py @@ -131,10 +131,10 @@ def start_osds(devices): # Scan for ceph block devices rescan_osd_devices() if cmp_pkgrevno('ceph', "0.56.6") >= 0: - # Use ceph-disk-activate for directory based OSD's + # Use ceph-disk activate for directory based OSD's for dev_or_path in devices: if os.path.exists(dev_or_path) and os.path.isdir(dev_or_path): - subprocess.check_call(['ceph-disk-activate', dev_or_path]) + subprocess.check_call(['ceph-disk', 'activate', dev_or_path]) def rescan_osd_devices(): @@ -367,7 +367,7 @@ def osdize_dev(dev, osd_format, osd_journal, reformat_osd=False, return status_set('maintenance', 'Initializing device {}'.format(dev)) - cmd = ['ceph-disk-prepare'] + cmd = ['ceph-disk', 'prepare'] # Later versions of ceph support more options if cmp_pkgrevno('ceph', '0.48.3') >= 0: if osd_format: @@ -407,7 +407,8 @@ def osdize_dir(path): mkdir(path) cmd = [ - 'ceph-disk-prepare', + 'ceph-disk', + 'prepare', '--data-dir', path ]