forked from rook/rook
Merge pull request #16705 from parth-gr/fix-pool-panic1
pool: retry if pool status is empty in rn controller
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user