pool: support CRUSH MSR rules for EC pools

Added failureDomains and osdsPerDomain fields to the
ErasureCodedSpec, which maps to the crush-num-failure-domains and
crush-osds-per-failure-domain Ceph EC profile parameters. This enables
creating EC pools that distribute chunks across fewer, larger hosts
without needing one host per data chunk.

Signed-off-by: Prabhala Tara Aasrita <taraprabhala@Prabhalas-MacBook-Pro.local>
(cherry picked from commit 715f38de91)
This commit is contained in:
Prabhala Tara Aasrita
2026-07-28 19:46:04 +00:00
committed by Mergify
parent 3b678364c8
commit ebf90170bc
6 changed files with 336 additions and 7 deletions
+133
View File
@@ -470,6 +470,22 @@ spec:
This is the number of OSDs that can be lost simultaneously before data cannot be recovered.
minimum: 0
type: integer
crushNumFailureDomains:
description: |-
Number of failure domains to use for erasure coded chunk placement.
When specified along with crushOSDsPerFailureDomain, a CRUSH MSR rule will be created
that distributes chunks across this many failure domains.
format: int32
minimum: 1
type: integer
crushOSDsPerFailureDomain:
description: |-
Number of OSDs allowed per failure domain for erasure coded chunk placement.
When specified along with crushNumFailureDomains, a CRUSH MSR rule will be created
that allows up to this many chunks on OSDs within each failure domain.
format: int32
minimum: 1
type: integer
dataChunks:
description: |-
Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).
@@ -496,6 +512,9 @@ spec:
- codingChunks
- dataChunks
type: object
x-kubernetes-validations:
- message: crushNumFailureDomains and crushOSDsPerFailureDomain must be specified together
rule: has(self.crushNumFailureDomains) == has(self.crushOSDsPerFailureDomain)
failureDomain:
description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map'
type: string
@@ -7785,6 +7804,22 @@ spec:
This is the number of OSDs that can be lost simultaneously before data cannot be recovered.
minimum: 0
type: integer
crushNumFailureDomains:
description: |-
Number of failure domains to use for erasure coded chunk placement.
When specified along with crushOSDsPerFailureDomain, a CRUSH MSR rule will be created
that distributes chunks across this many failure domains.
format: int32
minimum: 1
type: integer
crushOSDsPerFailureDomain:
description: |-
Number of OSDs allowed per failure domain for erasure coded chunk placement.
When specified along with crushNumFailureDomains, a CRUSH MSR rule will be created
that allows up to this many chunks on OSDs within each failure domain.
format: int32
minimum: 1
type: integer
dataChunks:
description: |-
Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).
@@ -7811,6 +7846,9 @@ spec:
- codingChunks
- dataChunks
type: object
x-kubernetes-validations:
- message: crushNumFailureDomains and crushOSDsPerFailureDomain must be specified together
rule: has(self.crushNumFailureDomains) == has(self.crushOSDsPerFailureDomain)
failureDomain:
description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map'
type: string
@@ -7995,6 +8033,22 @@ spec:
This is the number of OSDs that can be lost simultaneously before data cannot be recovered.
minimum: 0
type: integer
crushNumFailureDomains:
description: |-
Number of failure domains to use for erasure coded chunk placement.
When specified along with crushOSDsPerFailureDomain, a CRUSH MSR rule will be created
that distributes chunks across this many failure domains.
format: int32
minimum: 1
type: integer
crushOSDsPerFailureDomain:
description: |-
Number of OSDs allowed per failure domain for erasure coded chunk placement.
When specified along with crushNumFailureDomains, a CRUSH MSR rule will be created
that allows up to this many chunks on OSDs within each failure domain.
format: int32
minimum: 1
type: integer
dataChunks:
description: |-
Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).
@@ -8021,6 +8075,9 @@ spec:
- codingChunks
- dataChunks
type: object
x-kubernetes-validations:
- message: crushNumFailureDomains and crushOSDsPerFailureDomain must be specified together
rule: has(self.crushNumFailureDomains) == has(self.crushOSDsPerFailureDomain)
failureDomain:
description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map'
type: string
@@ -12943,6 +13000,22 @@ spec:
This is the number of OSDs that can be lost simultaneously before data cannot be recovered.
minimum: 0
type: integer
crushNumFailureDomains:
description: |-
Number of failure domains to use for erasure coded chunk placement.
When specified along with crushOSDsPerFailureDomain, a CRUSH MSR rule will be created
that distributes chunks across this many failure domains.
format: int32
minimum: 1
type: integer
crushOSDsPerFailureDomain:
description: |-
Number of OSDs allowed per failure domain for erasure coded chunk placement.
When specified along with crushNumFailureDomains, a CRUSH MSR rule will be created
that allows up to this many chunks on OSDs within each failure domain.
format: int32
minimum: 1
type: integer
dataChunks:
description: |-
Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).
@@ -12969,6 +13042,9 @@ spec:
- codingChunks
- dataChunks
type: object
x-kubernetes-validations:
- message: crushNumFailureDomains and crushOSDsPerFailureDomain must be specified together
rule: has(self.crushNumFailureDomains) == has(self.crushOSDsPerFailureDomain)
failureDomain:
description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map'
type: string
@@ -14600,6 +14676,22 @@ spec:
This is the number of OSDs that can be lost simultaneously before data cannot be recovered.
minimum: 0
type: integer
crushNumFailureDomains:
description: |-
Number of failure domains to use for erasure coded chunk placement.
When specified along with crushOSDsPerFailureDomain, a CRUSH MSR rule will be created
that distributes chunks across this many failure domains.
format: int32
minimum: 1
type: integer
crushOSDsPerFailureDomain:
description: |-
Number of OSDs allowed per failure domain for erasure coded chunk placement.
When specified along with crushNumFailureDomains, a CRUSH MSR rule will be created
that allows up to this many chunks on OSDs within each failure domain.
format: int32
minimum: 1
type: integer
dataChunks:
description: |-
Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).
@@ -14626,6 +14718,9 @@ spec:
- codingChunks
- dataChunks
type: object
x-kubernetes-validations:
- message: crushNumFailureDomains and crushOSDsPerFailureDomain must be specified together
rule: has(self.crushNumFailureDomains) == has(self.crushOSDsPerFailureDomain)
failureDomain:
description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map'
type: string
@@ -15690,6 +15785,22 @@ spec:
This is the number of OSDs that can be lost simultaneously before data cannot be recovered.
minimum: 0
type: integer
crushNumFailureDomains:
description: |-
Number of failure domains to use for erasure coded chunk placement.
When specified along with crushOSDsPerFailureDomain, a CRUSH MSR rule will be created
that distributes chunks across this many failure domains.
format: int32
minimum: 1
type: integer
crushOSDsPerFailureDomain:
description: |-
Number of OSDs allowed per failure domain for erasure coded chunk placement.
When specified along with crushNumFailureDomains, a CRUSH MSR rule will be created
that allows up to this many chunks on OSDs within each failure domain.
format: int32
minimum: 1
type: integer
dataChunks:
description: |-
Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).
@@ -15716,6 +15827,9 @@ spec:
- codingChunks
- dataChunks
type: object
x-kubernetes-validations:
- message: crushNumFailureDomains and crushOSDsPerFailureDomain must be specified together
rule: has(self.crushNumFailureDomains) == has(self.crushOSDsPerFailureDomain)
failureDomain:
description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map'
type: string
@@ -15895,6 +16009,22 @@ spec:
This is the number of OSDs that can be lost simultaneously before data cannot be recovered.
minimum: 0
type: integer
crushNumFailureDomains:
description: |-
Number of failure domains to use for erasure coded chunk placement.
When specified along with crushOSDsPerFailureDomain, a CRUSH MSR rule will be created
that distributes chunks across this many failure domains.
format: int32
minimum: 1
type: integer
crushOSDsPerFailureDomain:
description: |-
Number of OSDs allowed per failure domain for erasure coded chunk placement.
When specified along with crushNumFailureDomains, a CRUSH MSR rule will be created
that allows up to this many chunks on OSDs within each failure domain.
format: int32
minimum: 1
type: integer
dataChunks:
description: |-
Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type).
@@ -15921,6 +16051,9 @@ spec:
- codingChunks
- dataChunks
type: object
x-kubernetes-validations:
- message: crushNumFailureDomains and crushOSDsPerFailureDomain must be specified together
rule: has(self.crushNumFailureDomains) == has(self.crushOSDsPerFailureDomain)
failureDomain:
description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map'
type: string