From 95a5920bef2a543c1da14cdb79e37b7cde0ebd2e Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Fri, 18 Apr 2025 07:48:18 -0600 Subject: [PATCH] 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 --- pkg/operator/ceph/object/controller.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/operator/ceph/object/controller.go b/pkg/operator/ceph/object/controller.go index 7bd9d0f80..e81899926 100644 --- a/pkg/operator/ceph/object/controller.go +++ b/pkg/operator/ceph/object/controller.go @@ -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)