From 317ae70da47e9d385669dfeecc7c4fea603d9ad8 Mon Sep 17 00:00:00 2001 From: Adam King Date: Mon, 13 Feb 2023 16:25:38 -0500 Subject: [PATCH] mgr/orchestrator: allow deploying raw mode OSDs with --all-available-devices Fixes: https://tracker.ceph.com/issues/58714 Signed-off-by: Adam King (cherry picked from commit c034b08d952467a99be35a8cf6fc02834eb9a933) --- src/pybind/mgr/orchestrator/module.py | 4 +++- src/python-common/ceph/deployment/drive_group.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 73bd137484db..d60df488b343 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -738,6 +738,7 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule, unmanaged: Optional[bool] = None, dry_run: bool = False, no_overwrite: bool = False, + method: Optional[OSDMethod] = None, inbuf: Optional[str] = None # deprecated. Was deprecated before Quincy ) -> HandleCommandResult: """ @@ -780,7 +781,8 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule, placement=PlacementSpec(host_pattern='*'), data_devices=DeviceSelection(all=True), unmanaged=unmanaged, - preview_only=dry_run + preview_only=dry_run, + method=method ) ] return self._apply_misc(dg_specs, dry_run, format, no_overwrite) diff --git a/src/python-common/ceph/deployment/drive_group.py b/src/python-common/ceph/deployment/drive_group.py index b8397ca2789d..5d77ee685e79 100644 --- a/src/python-common/ceph/deployment/drive_group.py +++ b/src/python-common/ceph/deployment/drive_group.py @@ -15,6 +15,9 @@ class OSDMethod(str, enum.Enum): raw = 'raw' lvm = 'lvm' + def to_json(self) -> str: + return self.value + class DeviceSelection(object): """ -- 2.47.3