From 7ef4b4849c3b5a2827baf347d7a71387c09c1ce2 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Wed, 12 Nov 2025 11:51:53 +0530 Subject: [PATCH 1/2] pool: retry if pool status is empty in rn controller if the pool is just created and getting the status updated rn controller can still go and proceed to check the pool status If the pool status is empty we should retry instead of proceeding further Signed-off-by: parth-gr --- pkg/operator/ceph/pool/radosnamespace/controller.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/operator/ceph/pool/radosnamespace/controller.go b/pkg/operator/ceph/pool/radosnamespace/controller.go index 4a2c93d94..56ad37807 100644 --- a/pkg/operator/ceph/pool/radosnamespace/controller.go +++ b/pkg/operator/ceph/pool/radosnamespace/controller.go @@ -323,11 +323,9 @@ func (r *ReconcileCephBlockPoolRadosNamespace) reconcile(request reconcile.Reque } // If the cephBlockPool is not ready to accept commands, we should wait for it to be ready - if cephBlockPool.Status != nil { - if cephBlockPool.Status.Phase != cephv1.ConditionReady { - // We know the CR is present so it should a matter of second for it to become ready - return reconcile.Result{Requeue: true, RequeueAfter: 10 * time.Second}, radosNamespace, errors.Wrapf(err, "failed to fetch ceph blockpool %q, cannot create rados namespace %q", pool, radosNamespace.Name) - } + if cephBlockPool.Status == nil || cephBlockPool.Status.Phase != cephv1.ConditionReady { + // We know the CR is present so it should a matter of second for it to become ready + return reconcile.Result{Requeue: true, RequeueAfter: 10 * time.Second}, radosNamespace, errors.Wrapf(err, "failed to fetch ceph blockpool %q, cannot create rados namespace %q", pool, radosNamespace.Name) } // Create or Update rados namespace err = r.createOrUpdateRadosNamespace(radosNamespace) From fb7226698b39a9e8cae24cc41dd50f38871dd037 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Wed, 12 Nov 2025 11:58:53 +0530 Subject: [PATCH 2/2] subvolumegroup: retry if the filesystem status is empty in svg if the filesystem is just created and getting the status updated svg controller can still go and proceed to check the filesystem status If the filesystem status is empty we should retry instead of proceeding further Signed-off-by: parth-gr --- pkg/operator/ceph/file/subvolumegroup/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/operator/ceph/file/subvolumegroup/controller.go b/pkg/operator/ceph/file/subvolumegroup/controller.go index b2a11044a..9e23936ff 100644 --- a/pkg/operator/ceph/file/subvolumegroup/controller.go +++ b/pkg/operator/ceph/file/subvolumegroup/controller.go @@ -294,7 +294,7 @@ func (r *ReconcileCephFilesystemSubVolumeGroup) reconcile(request reconcile.Requ } // If the CephFilesystem is not ready to accept commands, we should wait for it to be ready - if cephFilesystem.Status.Phase != cephv1.ConditionReady { + if cephFilesystem.Status == nil || cephFilesystem.Status.Phase != cephv1.ConditionReady { // We know the CR is present so it should a matter of second for it to become ready return reconcile.Result{Requeue: true, RequeueAfter: 10 * time.Second}, errors.Wrapf(err, "failed to fetch ceph filesystem %q, cannot create subvolume group %q", cephFilesystemSubVolumeGroup.Spec.FilesystemName, cephFilesystemSubVolumeGroup.Name) }