]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephadm: use cephadm ceph-volume directly to zap devs
authorAdam King <adking@redhat.com>
Tue, 23 Apr 2024 15:53:58 +0000 (11:53 -0400)
committerAdam King <adking@redhat.com>
Mon, 22 Jul 2024 17:36:20 +0000 (13:36 -0400)
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 <adking@redhat.com>
(cherry picked from commit 5ec6d74256f3a8a0300e84af727d64eaa5c29ec8)

qa/tasks/cephadm.py

index dbc1d982a733ee2fd10629e3736df470bc741348..27e0f66d3337d97e0069ed89f1ba822bcd2928ff 100644 (file)
@@ -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')