]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephadm: add ability to deploy raw OSDS from cephadm task
authorAdam King <adking@redhat.com>
Tue, 9 Apr 2024 17:59:56 +0000 (13:59 -0400)
committerAdam King <adking@redhat.com>
Tue, 9 Apr 2024 17:59:56 +0000 (13:59 -0400)
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 <adking@redhat.com>
qa/tasks/cephadm.py

index 008d8c94d55bbe2ad16a5a09173632f81dfbb439..f3952bb4a7bbbfc0118ad1750d8668ed8d6cad49 100644 (file)
@@ -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