From 8af2ff9de5f84fc2f33b1b0dff9641b776204b40 Mon Sep 17 00:00:00 2001 From: jiuker Date: Fri, 18 Oct 2024 11:26:24 +0800 Subject: [PATCH 1/2] fix: incorrect error log fix: incorrect error log --- pkg/controller/main-controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/main-controller.go b/pkg/controller/main-controller.go index 0256db14742..1cee4817128 100644 --- a/pkg/controller/main-controller.go +++ b/pkg/controller/main-controller.go @@ -1348,7 +1348,7 @@ func (c *Controller) syncHandler(key string) (Result, error) { // Stay in this state until minio is ready if tenant.Status.HealthStatus != miniov2.HealthStatusGreen { c.updateTenantStatus(ctx, tenant, StatusWaitingMinIOIsHealthy, 0) - c.recorder.Event(tenant, corev1.EventTypeWarning, WaitingMinIOIsHealthyReason, fmt.Sprintf("Waiting for MinIO to be ready: %s", err)) + c.recorder.Event(tenant, corev1.EventTypeWarning, WaitingMinIOIsHealthyReason, fmt.Sprintf("Waiting for MinIO(%s/%s) to be ready", tenant.Namespace, tenant.Name)) // retry after 5sec return WrapResult(Result{RequeueAfter: time.Second * 5}, nil) } From cc011e600c523c2dd7233ccba88d76f11f91d6cc Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Fri, 18 Oct 2024 17:37:20 +0800 Subject: [PATCH 2/2] Update pkg/controller/main-controller.go Co-authored-by: Ramon de Klein --- pkg/controller/main-controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/main-controller.go b/pkg/controller/main-controller.go index 1cee4817128..c07a487d77a 100644 --- a/pkg/controller/main-controller.go +++ b/pkg/controller/main-controller.go @@ -1348,7 +1348,7 @@ func (c *Controller) syncHandler(key string) (Result, error) { // Stay in this state until minio is ready if tenant.Status.HealthStatus != miniov2.HealthStatusGreen { c.updateTenantStatus(ctx, tenant, StatusWaitingMinIOIsHealthy, 0) - c.recorder.Event(tenant, corev1.EventTypeWarning, WaitingMinIOIsHealthyReason, fmt.Sprintf("Waiting for MinIO(%s/%s) to be ready", tenant.Namespace, tenant.Name)) + c.recorder.Event(tenant, corev1.EventTypeWarning, WaitingMinIOIsHealthyReason, "Waiting for MinIO to be ready") // retry after 5sec return WrapResult(Result{RequeueAfter: time.Second * 5}, nil) }