From e409a288e398f87f2536e5a94331bbc71178f0bd 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 607cd4fad79..fcda16d1dd3 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -888,6 +888,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: """ @@ -930,7 +931,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 3141fd760e5..e8ee85885f6 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.39.5