Skip to content

Commit

Permalink
Merge pull request kubernetes#115036 from harche/vol_attach_log
Browse files Browse the repository at this point in the history
Do not log entire pod struct while attaching the volume
  • Loading branch information
k8s-ci-robot committed Apr 6, 2023
2 parents f28e9f6 + 1972dd1 commit 5434823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/volume/attachdetach/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ func (rc *reconciler) attachDesiredVolumes(logger klog.Logger) {
logger.V(5).Info("Starting attacherDetacher.AttachVolume", "volume", volumeToAttach)
err := rc.attacherDetacher.AttachVolume(logger, volumeToAttach.VolumeToAttach, rc.actualStateOfWorld)
if err == nil {
logger.Info("attacherDetacher.AttachVolume started", "volume", volumeToAttach)
logger.Info("attacherDetacher.AttachVolume started", "volumeName", volumeToAttach.VolumeName, "nodeName", volumeToAttach.NodeName, "scheduledPods", klog.KObjSlice(volumeToAttach.ScheduledPods))
}
if err != nil && !exponentialbackoff.IsExponentialBackoff(err) {
// Ignore exponentialbackoff.IsExponentialBackoff errors, they are expected.
// Log all other errors.
logger.Error(err, "attacherDetacher.AttachVolume failed to start", "volume", volumeToAttach)
logger.Error(err, "attacherDetacher.AttachVolume failed to start", "volumeName", volumeToAttach.VolumeName, "nodeName", volumeToAttach.NodeName, "scheduledPods", klog.KObjSlice(volumeToAttach.ScheduledPods))
}
}
}
Expand Down

0 comments on commit 5434823

Please sign in to comment.