From: Shraddha Agrawal Date: Mon, 9 Feb 2026 13:48:07 +0000 (+0530) Subject: cephadm: add support for seastore X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b5069eea2249aac209f2560acf411e7a55fba5de;p=ceph.git cephadm: add support for seastore This commit adds support for deploying seastore objectstore with cephdm. This can be done in two ways: 1. using OSD spec file, we can set the objectstore argument to seastore. eg - ``` service_type: osd service_id: osd_crimson_seastore placement: host_pattern: '*' spec: objectstore: seastore osd_type: crimson data_devices: all: true ``` 2. using --objectstore flag with ceph orch osd deploy. sample cmd: ``` ceph orch apply osd --all-available-devices --osd-type crimson --objectstore seastore ``` Fixes: https://tracker.ceph.com/issues/74616 Signed-off-by: Shraddha Agrawal --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 5fc2fce63fa..abfbad7bfd5 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -1473,7 +1473,8 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule): no_overwrite: bool = False, method: Optional[OSDMethod] = None, inbuf: Optional[str] = None, # deprecated. Was deprecated before Quincy - osd_type: Optional[OSDType] = None + osd_type: Optional[OSDType] = None, + objectstore: str = 'bluestore' ) -> HandleCommandResult: """ Create OSD daemon(s) on all available devices @@ -1517,7 +1518,8 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule): unmanaged=unmanaged, preview_only=dry_run, method=method, - osd_type=osd_type + osd_type=osd_type, + objectstore=objectstore ) ] return self._apply_misc(dg_specs, dry_run, format, no_overwrite) @@ -1529,7 +1531,8 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule): svc_arg: Optional[str] = None, method: Optional[OSDMethod] = None, skip_validation: bool = False, - osd_type: Optional[OSDType] = None) -> HandleCommandResult: + osd_type: Optional[OSDType] = None, + objectstore: str = 'bluestore') -> HandleCommandResult: """Create OSD daemon(s) on specified host and device(s) (e.g., ceph orch daemon add osd myhost:/dev/sdb)""" # Create one or more OSDs""" @@ -1579,6 +1582,7 @@ Usage: placement=PlacementSpec(host_pattern=host_name), method=method, osd_type=osd_type, + objectstore=objectstore, **drive_group_spec, ) except (TypeError, KeyError, ValueError) as e: diff --git a/src/python-common/ceph/deployment/drive_group.py b/src/python-common/ceph/deployment/drive_group.py index a40cada7e46..956bc9b67f1 100644 --- a/src/python-common/ceph/deployment/drive_group.py +++ b/src/python-common/ceph/deployment/drive_group.py @@ -257,7 +257,7 @@ class DriveGroupSpec(ServiceSpec): #: A list of strings, containing paths which should back OSDs self.data_directories = data_directories - #: ``filestore`` or ``bluestore`` + #: ``filestore`` or ``bluestore`` or ``seastore`` self.objectstore = objectstore #: ``true`` or ``false`` @@ -365,10 +365,10 @@ class DriveGroupSpec(ServiceSpec): self.service_id, "`all` is only allowed for data_devices") - if self.objectstore not in ('bluestore'): + if self.objectstore not in ['bluestore', 'seastore']: raise DriveGroupValidationError(self.service_id, f"{self.objectstore} is not supported. Must be " - f"one of ('bluestore')") + f"one of bluestore, seastore") if self.block_wal_size is not None and type(self.block_wal_size) not in [int, str]: raise DriveGroupValidationError( @@ -396,7 +396,10 @@ class DriveGroupSpec(ServiceSpec): raise DriveGroupValidationError( self.service_id, 'method raw only supports bluestore') - + if self.method == 'raw' and self.objectstore == 'seastore': + raise DriveGroupValidationError( + self.service_id, + 'method raw only supports bluestore') if self.data_devices.paths is not None: for device in list(self.data_devices.paths): if not device.path: @@ -405,6 +408,10 @@ class DriveGroupSpec(ServiceSpec): raise DriveGroupValidationError( self.service_id, 'osd_type must be one of classic, crimson') + if self.objectstore == 'seastore' and self.osd_type == 'classic': + raise DriveGroupValidationError( + self.service_id, + 'objectstore seastore only supports osd type crimson') yaml.add_representer(DriveGroupSpec, DriveGroupSpec.yaml_representer)