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

server: fix over redacted log lines #137915

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/server/auto_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (s *topLevelServer) startAttemptUpgrade(ctx context.Context) error {
for r := retry.StartWithCtx(ctx, retryOpts); r.Next(); {
clusterVersion, err := s.clusterVersion(ctx)
if err != nil {
log.Errorf(ctx, "unable to retrieve cluster version: %v", err)
log.Errorf(ctx, "unable to retrieve cluster version: %v", redact.Safe(err))
continue
}

Expand All @@ -58,10 +58,10 @@ func (s *topLevelServer) startAttemptUpgrade(ctx context.Context) error {
status, err := s.upgradeStatus(ctx, clusterVersion)
switch status {
case UpgradeBlockedDueToError:
log.Errorf(ctx, "failed attempt to upgrade cluster version, error: %v", err)
log.Errorf(ctx, "failed attempt to upgrade cluster version, error: %v", redact.Safe(err))
continue
case UpgradeBlockedDueToMixedVersions:
log.Infof(ctx, "failed attempt to upgrade cluster version: %v", err)
log.Infof(ctx, "failed attempt to upgrade cluster version: %v", redact.Safe(err))
continue
case UpgradeDisabledByConfigurationToPreserveDowngrade:
log.Infof(ctx, "auto upgrade is disabled by preserve_downgrade_option")
Expand Down Expand Up @@ -101,7 +101,7 @@ func (s *topLevelServer) startAttemptUpgrade(ctx context.Context) error {
sessiondata.NodeUserSessionDataOverride,
"SET CLUSTER SETTING version = crdb_internal.node_executable_version();",
); err != nil {
log.Errorf(ctx, "error when finalizing cluster version upgrade: %v", err)
log.Errorf(ctx, "error when finalizing cluster version upgrade: %v", redact.Safe(err))
} else {
log.Info(ctx, "successfully upgraded cluster version")
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func bumpClusterVersion(
return err
}
log.Infof(ctx, "active cluster version setting is now %s (up from %s)",
newCV.PrettyPrint(), prevCV.PrettyPrint())
redact.Safe(newCV.PrettyPrint()), redact.Safe(prevCV.PrettyPrint()))
return nil
}

Expand Down
Loading