From 18a41d4f02ff326f4581b85652cf3794d9391282 Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 23 Apr 2024 11:53:58 -0400 Subject: [PATCH] qa/cephadm: use cephadm ceph-volume directly to zap devs This was running ceph-volume through the cephadm shell previously, but as we are trying to remove mount points from cephadm shell, this no longer works (specifically without the /dev mount) Fixes: https://tracker.ceph.com/issues/66855 Signed-off-by: Adam King (cherry picked from commit 5ec6d74256f3a8a0300e84af727d64eaa5c29ec8) --- qa/tasks/cephadm.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index dbc1d982a73..27e0f66d333 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -1080,8 +1080,18 @@ def ceph_osds(ctx, config): short_dev = dev log.info('Deploying %s on %s with %s...' % ( osd, remote.shortname, dev)) - _shell(ctx, cluster_name, remote, [ - 'ceph-volume', 'lvm', 'zap', dev]) + remote.run( + args=[ + 'sudo', + ctx.cephadm, + '--image', ctx.ceph[cluster_name].image, + 'ceph-volume', + '-c', '/etc/ceph/{}.conf'.format(cluster_name), + '-k', '/etc/ceph/{}.client.admin.keyring'.format(cluster_name), + '--fsid', ctx.ceph[cluster_name].fsid, + '--', 'lvm', 'zap', dev + ] + ) add_osd_args = ['ceph', 'orch', 'daemon', 'add', 'osd', remote.shortname + ':' + short_dev] osd_method = config.get('osd_method') -- 2.39.5