report an event if kubelet does attach operation failed when kubelet is running with --enable-controller-attach-detach=false
This commit is contained in:
		| @@ -250,9 +250,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) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 carlory
					carlory