qa/tasks/cephadm: pass short dev name to osd prepare

Zap needs a full path, but create/prepare needs the VG/LV
only if it is an existing LV.

We'll make c-v more friendly later.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2020-01-28 15:41:02 +00:00
parent b44f165107
commit f026a1c9f6

View File

@ -576,13 +576,14 @@ def ceph_osds(ctx, config):
devs = devs_by_remote[remote]
assert devs ## FIXME ##
dev = devs.pop()
short_dev = dev.replace('/dev/', '')
log.info('Deploying %s on %s with %s...' % (
osd, remote.shortname, dev))
_shell(ctx, cluster_name, remote, [
'ceph-volume', 'lvm', 'zap', dev])
_shell(ctx, cluster_name, remote, [
'ceph', 'orchestrator', 'osd', 'create',
remote.shortname + ':' + dev
remote.shortname + ':' + short_dev
])
ctx.daemons.register_daemon(
remote, 'osd', id_,