Skip to content

Commit

Permalink
server: fix over redacted log lines
Browse files Browse the repository at this point in the history
Previosuly, few log lines were getting redacted assuming that it contains
sensitive information. Support team was facing challenges during dignostics. To
address this, this patch address few of the log lines which were overly
redacted.

Epic: CRDB-37533
Part of: CRDB-44885
Release note: None
  • Loading branch information
aa-joshi committed Dec 23, 2024
1 parent 6eb6d49 commit 430dd79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 430dd79

Please sign in to comment.