From 01c779fcd42e8e0c8729084cb90b27805db789bb Mon Sep 17 00:00:00 2001 From: Raphael 'kena' Poss Date: Fri, 21 Apr 2023 09:09:11 +0200 Subject: [PATCH] tenantcapabilitiesauthorizer: avoid log spam One of the previous commits was misusing log.Warning where log.VEventf was expected. Release note: None --- .../tenantcapabilitiesauthorizer/authorizer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/multitenant/tenantcapabilities/tenantcapabilitiesauthorizer/authorizer.go b/pkg/multitenant/tenantcapabilities/tenantcapabilitiesauthorizer/authorizer.go index dff8ba94f4ad..2c4ae8f1b034 100644 --- a/pkg/multitenant/tenantcapabilities/tenantcapabilitiesauthorizer/authorizer.go +++ b/pkg/multitenant/tenantcapabilities/tenantcapabilitiesauthorizer/authorizer.go @@ -372,6 +372,7 @@ func (a *Authorizer) getMode( if reader == nil { // The server has started but the reader hasn't started/bound // yet. Block requests that would need specific capabilities. + log.Warningf(ctx, "capability check for tenant %s before capability reader exists, assuming capability is unavailable", tid) selectedMode = authorizerModeV222 } else { // We have a reader. Did we get data from the rangefeed yet? @@ -380,7 +381,9 @@ func (a *Authorizer) getMode( if !found { // No data from the rangefeed yet. Assume caps are still // unavailable. - log.Warningf(ctx, "capability check for tenant %s before capability reader exists, assuming capability is unavailable", tid.String()) + log.VInfof(ctx, 2, + "no capability information for tenant %s; requests that require capabilities may be denied", + tid) selectedMode = authorizerModeV222 } }