Merge pull request #16241 from rook/mergify/bp/release-1.18/pr-16104

core: set erasure-code-profile plugin based on pool algorithm (backport #16104)
This commit is contained in:
mergify[bot] authored and GitHub committed 2025-08-04 23:20:02 +00:00
commit b3ad41b04b
5 files changed
+93 -16

No files matched your search

+2 -1
View File
@@ -6678,7 +6678,8 @@ string
</td>
<td>
<em>(Optional)</em>
<p>The algorithm for erasure coding</p>
<p>The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.</p>
</td>
</tr>
</tbody>
@@ -454,7 +454,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -7551,7 +7556,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -7740,7 +7750,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -11445,7 +11460,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -13046,7 +13066,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -14006,7 +14031,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -14190,7 +14220,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
+42 -7
View File
@@ -456,7 +456,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -7546,7 +7551,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -7735,7 +7745,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -11436,7 +11451,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -13037,7 +13057,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -13994,7 +14019,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
@@ -14178,7 +14208,12 @@ spec:
description: The erasure code settings
properties:
algorithm:
description: The algorithm for erasure coding
description: |-
The algorithm for erasure coding.
If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
enum:
- isa
- jerasure
type: string
codingChunks:
description: |-
+3 -1
View File
@@ -1315,7 +1315,9 @@ type ErasureCodedSpec struct {
// +kubebuilder:validation:Minimum=0
DataChunks uint `json:"dataChunks"`
// The algorithm for erasure coding
// The algorithm for erasure coding.
// If absent, defaults to the plugin specified in osd_pool_default_erasure_code_profile.
// +kubebuilder:validation:Enum=isa;jerasure
// +optional
Algorithm string `json:"algorithm,omitempty"`
}
@@ -72,6 +72,10 @@ func CreateErasureCodeProfile(context *clusterd.Context, clusterInfo *ClusterInf
return errors.Wrap(err, "failed to look up default erasure code profile")
}
if pool.ErasureCoded.Algorithm != "" {
defaultProfile.Plugin = pool.ErasureCoded.Algorithm
}
// define the profile with a set of key/value pairs
profilePairs := []string{
fmt.Sprintf("k=%d", pool.ErasureCoded.DataChunks),