From: Adam King Date: Tue, 23 Apr 2024 15:53:58 +0000 (-0400) Subject: qa/cephadm: use cephadm ceph-volume directly to zap devs X-Git-Tag: v19.1.1~61^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F58663%2Fhead;p=ceph.git 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) --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index dbc1d982a733..27e0f66d3337 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')