summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam King <adking@redhat.com>2024-04-23 17:53:58 +0200
committerAdam King <adking@redhat.com>2024-08-02 18:32:51 +0200
commit8164efe5d09b982503b812470ed5b636125f4bf7 (patch)
treeeafc505ef13a4c25e80fd782608856968f09c87d
parentcephadm: limit mounts for shell and ceph-volume commands (diff)
downloadceph-8164efe5d09b982503b812470ed5b636125f4bf7.tar.xz
ceph-8164efe5d09b982503b812470ed5b636125f4bf7.zip
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) Signed-off-by: Adam King <adking@redhat.com>
-rw-r--r--qa/tasks/cephadm.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py
index 19258f216e1..166ea9537ee 100644
--- a/qa/tasks/cephadm.py
+++ b/qa/tasks/cephadm.py
@@ -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')