Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #5029 to release/2.12.x #5030

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions internal/clients/readiness.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ func (c DefaultReadinessChecker) checkPendingClient(
client, err := c.factory.CreateAdminAPIClient(ctx, pendingClient)
if err != nil {
// Despite the error reason we still want to keep the client in the pending list to retry later.
c.logger.V(util.DebugLevel).Error(err, fmt.Sprintf("pending client for %q is not ready yet", pendingClient.Address))
c.logger.V(util.DebugLevel).Info("pending client is not ready yet",
"reason", err.Error(),
"address", pendingClient.Address,
)
return nil
}

Expand All @@ -123,7 +126,8 @@ func (c DefaultReadinessChecker) checkAlreadyExistingClients(ctx context.Context
// This should never happen, but if it does, we want to log it.
c.logger.Error(
errors.New("missing pod reference"),
fmt.Sprintf("failed to get PodReference for client %q", client.BaseRootURL()),
"failed to get PodReference for client",
"address", client.BaseRootURL(),
)
continue
}
Expand All @@ -148,9 +152,10 @@ func (c DefaultReadinessChecker) checkAlreadyCreatedClient(ctx context.Context,
defer cancel()
if err := client.IsReady(ctx); err != nil {
// Despite the error reason we still want to keep the client in the pending list to retry later.
c.logger.V(util.DebugLevel).Error(
err,
fmt.Sprintf("already created client for %q is not ready, moving to pending", client.BaseRootURL()),
c.logger.V(util.DebugLevel).Info(
"already created client is not ready, moving to pending",
"address", client.BaseRootURL(),
"reason", err.Error(),
)
return false
}
Expand Down