From 59398ea04abe0c05e5311c9bb4415b66766a1678 Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Thu, 26 Sep 2024 03:02:02 +0800 Subject: [PATCH] fix: empty tenant log (#2324) --- pkg/controller/monitoring.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/controller/monitoring.go b/pkg/controller/monitoring.go index e1afaae6533..884c3eb1ae8 100644 --- a/pkg/controller/monitoring.go +++ b/pkg/controller/monitoring.go @@ -154,8 +154,10 @@ func (c *Controller) updateHealthStatusForTenant(tenant *miniov2.Tenant) (*minio } // partial status update, since the storage info might take a while - if tenant, err = c.updatePoolStatus(context.Background(), tenant); err != nil { + if tenantUpdate, err := c.updatePoolStatus(context.Background(), tenant); err != nil { klog.Infof("'%s/%s' Can't update tenant status: %v", tenant.Namespace, tenant.Name, err) + } else { + tenant = tenantUpdate } srvInfoCtx, cancel := context.WithTimeout(context.Background(), 120*time.Second)