mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +00:00
Merge pull request #115036 from harche/vol_attach_log
Do not log entire pod struct while attaching the volume
This commit is contained in:
commit
54348233b5
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user