qa/tasks/cephadm: Add support for raw disks

Currently tests on raw disks are failing due to stripping '/dev/' from
device name. (ie https://tracker.ceph.com/issues/45383#change-165721)

Signed-off-by: Georgios Kyratsas <gkyratsas@suse.com>
This commit is contained in:
Georgios Kyratsas 2020-05-13 13:29:35 +02:00
parent a002b28bc1
commit 35e158605e

View File

@ -595,7 +595,10 @@ def ceph_osds(ctx, config):
devs = devs_by_remote[remote]
assert devs ## FIXME ##
dev = devs.pop()
short_dev = dev.replace('/dev/', '')
if all(_ in dev for _ in ('lv', 'vg')):
short_dev = dev.replace('/dev/', '')
else:
short_dev = dev
log.info('Deploying %s on %s with %s...' % (
osd, remote.shortname, dev))
_shell(ctx, cluster_name, remote, [