Merge pull request #124884 from carlory/report-event-when-kubelet-attach-failed

report an event to pod if kubelet does attach operation failed
This commit is contained in:
Kubernetes Prow Robot 2024-07-23 09:20:43 -07:00 committed by GitHub
commit d7194eb370
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -251,6 +251,7 @@ func (rc *reconciler) waitForVolumeAttach(volumeToMount cache.VolumeToMount) {
VolumeName: volumeToMount.VolumeName, VolumeName: volumeToMount.VolumeName,
VolumeSpec: volumeToMount.VolumeSpec, VolumeSpec: volumeToMount.VolumeSpec,
NodeName: rc.nodeName, NodeName: rc.nodeName,
ScheduledPods: []*v1.Pod{volumeToMount.Pod},
} }
klog.V(5).InfoS(volumeToAttach.GenerateMsgDetailed("Starting operationExecutor.AttachVolume", ""), "pod", klog.KObj(volumeToMount.Pod)) klog.V(5).InfoS(volumeToAttach.GenerateMsgDetailed("Starting operationExecutor.AttachVolume", ""), "pod", klog.KObj(volumeToMount.Pod))
err := rc.operationExecutor.AttachVolume(logger, volumeToAttach, rc.actualStateOfWorld) err := rc.operationExecutor.AttachVolume(logger, volumeToAttach, rc.actualStateOfWorld)