Provide the real path of device for ceph to prepare

This is a followup patch for the previous commits that are
addressing issues with bcache based configuration.

Providing dname path for ceph-disk is unsafe, the prepare command
uses gdisk which breaks the dname symlinks.

Change-Id: Id3f360c90d40b77720d7bc7c1bf94b79f71b6827
Closes-Bug: 1790186
Signed-off-by: Gabor Meszaros <gabor.meszaros@canonical.com>
This commit is contained in:
Gabor Meszaros 2018-08-31 19:21:59 +02:00
parent a97120757c
commit 412612a286
1 changed files with 3 additions and 2 deletions

View File

@ -1525,7 +1525,8 @@ def _ceph_disk(dev, osd_format, osd_journal, encrypt=False, bluestore=False):
"""
Prepare a device for usage as a Ceph OSD using ceph-disk
:param: dev: Full path to use for OSD block device setup
:param: dev: Full path to use for OSD block device setup,
The function looks up realpath of the device
:param: osd_journal: List of block devices to use for OSD journals
:param: encrypt: Use block device encryption (unsupported)
:param: bluestore: Use bluestore storage for OSD
@ -1557,7 +1558,7 @@ def _ceph_disk(dev, osd_format, osd_journal, encrypt=False, bluestore=False):
elif cmp_pkgrevno('ceph', '12.1.0') >= 0 and not bluestore:
cmd.append('--filestore')
cmd.append(dev)
cmd.append(os.path.realpath(dev))
if osd_journal:
least_used = find_least_used_utility_device(osd_journal)