From 78ca1234606e38a1d2610af52c03a53d657ce381 Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 9 Apr 2024 13:59:56 -0400 Subject: [PATCH] qa/cephadm: add ability to deploy raw OSDS from cephadm task For now, it only works in a roleless fashion as OSD deployment with roles is a bit more complicated. Unless we want to deploy a mix of raw and lvm OSDs in one test, having it work in roleless setups should be enough. Signed-off-by: Adam King --- qa/tasks/cephadm.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 008d8c94d55bb..f3952bb4a7bbb 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -1060,7 +1060,12 @@ def ceph_osds(ctx, config): id_to_remote[int(id_)] = (osd, remote) cur = 0 + raw = config.get('raw-osds', False) for osd_id in sorted(id_to_remote.keys()): + if raw: + raise ConfigError( + "raw-osds is only supported without OSD roles" + ) osd, remote = id_to_remote[osd_id] _, _, id_ = teuthology.split_role(osd) assert int(id_) == cur @@ -1092,9 +1097,10 @@ def ceph_osds(ctx, config): cur += 1 if cur == 0: - _shell(ctx, cluster_name, remote, [ - 'ceph', 'orch', 'apply', 'osd', '--all-available-devices', - ]) + osd_cmd = ['ceph', 'orch', 'apply', 'osd', '--all-available-devices'] + if raw: + osd_cmd.extend(['--method', 'raw']) + _shell(ctx, cluster_name, remote, osd_cmd) # expect the number of scratch devs num_osds = sum(map(len, devs_by_remote.values())) assert num_osds -- 2.39.5