core: set erasure-code-profile plugin based on pool algorithm
When a `CephBlockPool` defines `spec.erasureCoded.algorithm`, use it as the erasure-code-profile plugin. Until now, that parameter would have been ignored completely, and every erasure-coded pool would use the same plugin as the `default` erasure-code-profile (i.e. `jerasure`). Note that using any algorithm other than `jerasure` or `isa` is likely to fail given the current implementation, as different algorithm require different sets of parameters, and those cannot be supplied by the user. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
This commit is contained in:
1 parent
dfec0b196e
commit
d7f08693ed
1 file changed
+4
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user