From 87bc3dfcdcf279668050374f9b8a5d67483369b7 Mon Sep 17 00:00:00 2001 From: Lucas Henry Date: Tue, 20 Jun 2023 09:54:42 +0200 Subject: [PATCH] operator: remove confusing successful message when reconciling CephObjectStoreUser When creating a CephObjectStoreUser with a value spec.store that refers to an unexisting CephObjectStore, after the reconciliation loop the CephObjectStoreUser is in the ReconcileFailed state. However, a ReconcileSucceeded event is created with this message: "successfully configured CephObjectStoreUser" The success message results of the return value for the error which is currently `nil`. Let's replace it with the error message. Signed-off-by: Lucas Henry --- pkg/operator/ceph/object/user/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/operator/ceph/object/user/controller.go b/pkg/operator/ceph/object/user/controller.go index d4b609635..9e04464c1 100644 --- a/pkg/operator/ceph/object/user/controller.go +++ b/pkg/operator/ceph/object/user/controller.go @@ -209,7 +209,7 @@ func (r *ReconcileObjectStoreUser) reconcile(request reconcile.Request) (reconci logger.Debugf("ObjectStore resource not ready in namespace %q, retrying in %q. %v", request.NamespacedName.Namespace, opcontroller.WaitForRequeueIfCephClusterNotReady.RequeueAfter.String(), err) r.updateStatus(k8sutil.ObservedGenerationNotAvailable, request.NamespacedName, k8sutil.ReconcileFailedStatus) - return opcontroller.WaitForRequeueIfCephClusterNotReady, *cephObjectStoreUser, nil + return opcontroller.WaitForRequeueIfCephClusterNotReady, *cephObjectStoreUser, err } // Generate user config