mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #123032 from carlory/fix-122960
fix GenerateUnmapVolumeFunc missing globalUnmapPath
This commit is contained in:
		@@ -1295,7 +1295,12 @@ func (og *operationGenerator) GenerateUnmapVolumeFunc(
 | 
			
		||||
		// pods/{podUid}/volumeDevices/{escapeQualifiedPluginName}/{volumeName}
 | 
			
		||||
		podDeviceUnmapPath, volName := blockVolumeUnmapper.GetPodDeviceMapPath()
 | 
			
		||||
		// plugins/kubernetes.io/{PluginName}/volumeDevices/{volumePluginDependentPath}/{podUID}
 | 
			
		||||
		globalUnmapPath := volumeToUnmount.DeviceMountPath
 | 
			
		||||
		globalUnmapPath, err := blockVolumeUnmapper.GetGlobalMapPath(volumeToUnmount.VolumeSpec)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			// On failure, return error. Caller will log and retry.
 | 
			
		||||
			eventErr, detailedErr := volumeToUnmount.GenerateError("UnmapVolume.GetGlobalMapPath failed", err)
 | 
			
		||||
			return volumetypes.NewOperationContext(eventErr, detailedErr, migrated)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Mark the device as uncertain to make sure kubelet calls UnmapDevice again in all the "return err"
 | 
			
		||||
		// cases below. The volume is marked as fully un-mapped at the end of this function, when everything
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user