mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
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:
commit
d7194eb370
@ -248,9 +248,10 @@ func (rc *reconciler) waitForVolumeAttach(volumeToMount cache.VolumeToMount) {
|
|||||||
// Volume is not attached to node, kubelet attach is enabled, volume implements an attacher,
|
// Volume is not attached to node, kubelet attach is enabled, volume implements an attacher,
|
||||||
// so attach it
|
// so attach it
|
||||||
volumeToAttach := operationexecutor.VolumeToAttach{
|
volumeToAttach := operationexecutor.VolumeToAttach{
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user