Implement return status codes

This commit is contained in:
Hemant Kumar
2019-09-24 18:25:33 -04:00
parent 50dbcb3e00
commit dc9e64c31e
16 changed files with 100 additions and 2 deletions

View File

@@ -575,12 +575,12 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
}
// Mount device to global mount path
err = volumeDeviceMounter.MountDevice(
operationState, err := volumeDeviceMounter.MountDeviceWithStatusTracking(
volumeToMount.VolumeSpec,
devicePath,
deviceMountPath)
if err != nil {
if volumetypes.IsOperationTimeOutError(err) {
if operationState == volumetypes.OperationInProgress {
markDeviceUncertainError := actualStateOfWorld.MarkDeviceAsUncertain(volumeToMount.VolumeName, devicePath, deviceMountPath)
if markDeviceUncertainError != nil {
klog.Infof("MountVolume.MarkDeviceAsUncertain failed with %v", markDeviceUncertainError)