ceph: fix status for EC pool creation
Creating an EC pool was succeeding, but then the update to the status was failing because of an incorrect check for changing EC parameters. Now we correctly check if EC parameters are changing unexpectedly. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This commit is contained in:
2 files changed
+1
-2
No files matched your search
@@ -11,7 +11,6 @@ metadata:
|
||||
spec:
|
||||
# The failure domain will spread the replicas of the data across different failure zones
|
||||
failureDomain: osd
|
||||
# For an erasure-coded pool, comment out the replicated size above and uncomment the following settings.
|
||||
# Make sure you have enough OSDs to support the replica size or sum of the erasure coding and data chunks.
|
||||
# This is the minimal example that requires only 3 OSDs.
|
||||
erasureCoded:
|
||||
|
||||
@@ -120,7 +120,7 @@ func (c *PoolController) onUpdate(oldObj, newObj interface{}) {
|
||||
updateCephBlockPoolStatus(pool.GetName(), pool.GetNamespace(), k8sutil.FailedStatus, c.context)
|
||||
return
|
||||
}
|
||||
if pool.Spec.ErasureCoded.CodingChunks != 0 && pool.Spec.ErasureCoded.DataChunks != 0 {
|
||||
if oldPool.Spec.ErasureCoded.CodingChunks != pool.Spec.ErasureCoded.CodingChunks || oldPool.Spec.ErasureCoded.DataChunks != pool.Spec.ErasureCoded.DataChunks {
|
||||
logger.Errorf("failed to update pool %q. erasurecoded update not allowed", pool.Name)
|
||||
updateCephBlockPoolStatus(pool.GetName(), pool.GetNamespace(), k8sutil.FailedStatus, c.context)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user