object: log all reconcile errors during object store creation
The object store controller was swallowing errors of the
type not found, assuming a certain category of errors
when ceph may still be initializing. But some of these
errors could be user error and they need to troubleshoot
the details of the error, so we need to log the specific
error instead of swallowing it.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 95a5920bef)
This commit is contained in:
1 parent
458f5ffd5e
commit
5be41e2b8a
1 file changed
+3
-1
@@ -441,7 +441,9 @@ func (r *ReconcileCephObjectStore) reconcile(request reconcile.Request) (reconci
|
||||
// CREATE/UPDATE
|
||||
_, err = r.reconcileCreateObjectStore(cephObjectStore, request.NamespacedName, cephCluster.Spec)
|
||||
if err != nil && kerrors.IsNotFound(err) {
|
||||
logger.Info(opcontroller.OperatorNotInitializedMessage)
|
||||
// A not found error may mean ceph is still initializing, but there might be some other error
|
||||
// so we log the error and requeue
|
||||
logger.Warningf("object store %q reconcile failed, ceph may still be initializing. %v", request.NamespacedName.String(), err)
|
||||
return opcontroller.WaitForRequeueIfOperatorNotInitialized, *cephObjectStore, nil
|
||||
} else if err != nil {
|
||||
result, err := r.setFailedStatus(k8sutil.ObservedGenerationNotAvailable, request.NamespacedName, "failed to create object store deployments", err)
|
||||
|
||||
Reference in new issue
Block a user