mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 13:07:07 +00:00
Fix error messages in operation_generator.go
This commit is contained in:
parent
a2cbc028f4
commit
aee875a855
@ -1039,7 +1039,7 @@ func (og *operationGenerator) GenerateMapVolumeFunc(
|
|||||||
blockVolumeMapper.GetGlobalMapPath(volumeToMount.VolumeSpec)
|
blockVolumeMapper.GetGlobalMapPath(volumeToMount.VolumeSpec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// On failure, return error. Caller will log and retry.
|
// On failure, return error. Caller will log and retry.
|
||||||
return volumeToMount.GenerateError("MapVolume.GetDeviceMountPath failed", err)
|
return volumeToMount.GenerateError("MapVolume.GetGlobalMapPath failed", err)
|
||||||
}
|
}
|
||||||
if volumeAttacher != nil {
|
if volumeAttacher != nil {
|
||||||
// Wait for attachable volumes to finish attaching
|
// Wait for attachable volumes to finish attaching
|
||||||
@ -1059,7 +1059,7 @@ func (og *operationGenerator) GenerateMapVolumeFunc(
|
|||||||
pluginDevicePath, mapErr := blockVolumeMapper.SetUpDevice()
|
pluginDevicePath, mapErr := blockVolumeMapper.SetUpDevice()
|
||||||
if mapErr != nil {
|
if mapErr != nil {
|
||||||
// On failure, return error. Caller will log and retry.
|
// On failure, return error. Caller will log and retry.
|
||||||
return volumeToMount.GenerateError("MapVolume.SetUp failed", mapErr)
|
return volumeToMount.GenerateError("MapVolume.SetUpDevice failed", mapErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if pluginDevicePath is provided, assume attacher may not provide device
|
// if pluginDevicePath is provided, assume attacher may not provide device
|
||||||
@ -1090,14 +1090,14 @@ func (og *operationGenerator) GenerateMapVolumeFunc(
|
|||||||
mapErr = blockVolumeMapper.MapDevice(devicePath, globalMapPath, volumeMapPath, volName, volumeToMount.Pod.UID)
|
mapErr = blockVolumeMapper.MapDevice(devicePath, globalMapPath, volumeMapPath, volName, volumeToMount.Pod.UID)
|
||||||
if mapErr != nil {
|
if mapErr != nil {
|
||||||
// On failure, return error. Caller will log and retry.
|
// On failure, return error. Caller will log and retry.
|
||||||
return volumeToMount.GenerateError("MapVolume.MapPodDevice failed", mapErr)
|
return volumeToMount.GenerateError("MapVolume.MapDevice failed", mapErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute common map
|
// Execute common map
|
||||||
mapErr = ioutil.MapBlockVolume(og.blkUtil, devicePath, globalMapPath, volumeMapPath, volName, volumeToMount.Pod.UID)
|
mapErr = ioutil.MapBlockVolume(og.blkUtil, devicePath, globalMapPath, volumeMapPath, volName, volumeToMount.Pod.UID)
|
||||||
if mapErr != nil {
|
if mapErr != nil {
|
||||||
// On failure, return error. Caller will log and retry.
|
// On failure, return error. Caller will log and retry.
|
||||||
return volumeToMount.GenerateError("MapVolume.MapDevice failed", mapErr)
|
return volumeToMount.GenerateError("MapVolume.MapBlockVolume failed", mapErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update actual state of world to reflect volume is globally mounted
|
// Update actual state of world to reflect volume is globally mounted
|
||||||
|
Loading…
Reference in New Issue
Block a user