pool: fix pool status check 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
which result in panic
and later it stop re-trying because of panic get swallowed
https://github.com/rook/rook/commit/cf13deee6f0aaa1ff854d57493bf91df70f8f436

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit ec242d5ee7)
This commit is contained in:
parth-gr authored and Mergify committed 2025-11-12 06:22:26 +00:00
1 parent a2b9854a1c
commit 350129fb42
1 file changed
+5 -3
@@ -325,9 +325,11 @@ 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.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 {
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)
}
}
// Create or Update rados namespace
err = r.createOrUpdateRadosNamespace(radosNamespace)