]> 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>
Fri, 2 Aug 2024 16:32:51 +0000 (12:32 -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)

Signed-off-by: Adam King <adking@redhat.com>
qa/tasks/cephadm.py

index 19258f216e1a1a4e3a35cb52b7967c90def2e779..166ea9537ee72e8f4232545ade34a6aa3c90727b 100644 (file)
@@ -1086,8 +1086,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')