From af1e8c320abe5ce2f762f50598b8522b64630bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 4 Aug 2020 17:55:09 +0200 Subject: [PATCH] ceph: do not log an error if no clusters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the list of cluster is empty there is no need to report an error in the logs. Signed-off-by: Sébastien Han --- pkg/operator/ceph/controller/controller_utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/operator/ceph/controller/controller_utils.go b/pkg/operator/ceph/controller/controller_utils.go index 79572143c..f746d1920 100644 --- a/pkg/operator/ceph/controller/controller_utils.go +++ b/pkg/operator/ceph/controller/controller_utils.go @@ -58,11 +58,11 @@ func IsReadyToReconcile(c client.Client, clustercontext *clusterd.Context, names clusterList := &cephv1.CephClusterList{} err := c.List(context.TODO(), clusterList, client.InNamespace(namespacedName.Namespace)) if err != nil { - logger.Errorf("%q:failed to fetch CephCluster %v", controllerName, err) + logger.Errorf("%q: failed to fetch CephCluster %v", controllerName, err) return cephCluster, false, cephClusterExists, ImmediateRetryResult } if len(clusterList.Items) == 0 { - logger.Errorf("%q: no CephCluster resource found in namespace %q", controllerName, namespacedName.Namespace) + logger.Debugf("%q: no CephCluster resource found in namespace %q", controllerName, namespacedName.Namespace) return cephCluster, false, cephClusterExists, WaitForRequeueIfCephClusterNotReady } cephClusterExists = true