diff --git a/cluster/examples/kubernetes/ceph/pool-ec.yaml b/cluster/examples/kubernetes/ceph/pool-ec.yaml index e3e550cea..8b0a60c96 100644 --- a/cluster/examples/kubernetes/ceph/pool-ec.yaml +++ b/cluster/examples/kubernetes/ceph/pool-ec.yaml @@ -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: diff --git a/pkg/operator/ceph/pool/controller.go b/pkg/operator/ceph/pool/controller.go index 3ecaa6d3e..bec317f26 100644 --- a/pkg/operator/ceph/pool/controller.go +++ b/pkg/operator/ceph/pool/controller.go @@ -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