From: Jonas Pfefferle Date: Wed, 7 Apr 2021 11:11:39 +0000 (+0200) Subject: python-common: add data_allocate_fraction to DriveGroupSpec X-Git-Tag: v17.1.0~1723^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f249d17cc7dfa943b002fc0be7231f294ae595a;p=ceph.git python-common: add data_allocate_fraction to DriveGroupSpec data_allocate_fraction is used to partially allocate a drive. Signed-off-by: Jonas Pfefferle --- diff --git a/src/python-common/ceph/deployment/drive_group.py b/src/python-common/ceph/deployment/drive_group.py index 93d7aaef177..e063e0d5d82 100644 --- a/src/python-common/ceph/deployment/drive_group.py +++ b/src/python-common/ceph/deployment/drive_group.py @@ -143,7 +143,8 @@ class DriveGroupSpec(ServiceSpec): "db_slots", "wal_slots", "block_db_size", "placement", "service_id", "service_type", "data_devices", "db_devices", "wal_devices", "journal_devices", "data_directories", "osds_per_device", "objectstore", "osd_id_claims", - "journal_size", "unmanaged", "filter_logic", "preview_only" + "journal_size", "unmanaged", "filter_logic", "preview_only", + "data_allocate_fraction" ] def __init__(self, @@ -167,6 +168,7 @@ class DriveGroupSpec(ServiceSpec): unmanaged=False, # type: bool filter_logic='AND', # type: str preview_only=False, # type: bool + data_allocate_fraction=None, # type: Optional[float] ): assert service_type is None or service_type == 'osd' super(DriveGroupSpec, self).__init__('osd', service_id=service_id, @@ -225,6 +227,9 @@ class DriveGroupSpec(ServiceSpec): #: If this should be treated as a 'preview' spec self.preview_only = preview_only + #: Allocate a fraction of the data device (0,1.0] + self.data_allocate_fraction = data_allocate_fraction + @classmethod def _from_json_impl(cls, json_drive_group): # type: (dict) -> DriveGroupSpec