Set node_stage whenever available

This commit is contained in:
Hemant Kumar 2023-01-26 15:27:20 -05:00
parent 0e6f4d3a35
commit f052ea3ec3

View File

@ -669,6 +669,16 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
resizeOptions.DeviceStagePath = deviceMountPath
}
if volumeDeviceMounter != nil && resizeOptions.DeviceStagePath == "" {
deviceStagePath, err := volumeDeviceMounter.GetDeviceMountPath(volumeToMount.VolumeSpec)
if err != nil {
// On failure, return error. Caller will log and retry.
eventErr, detailedErr := volumeToMount.GenerateError("MountVolume.GetDeviceMountPath failed for expansion", err)
return volumetypes.NewOperationContext(eventErr, detailedErr, migrated)
}
resizeOptions.DeviceStagePath = deviceStagePath
}
// No mapping is needed for hostUID/hostGID if userns is not used.
// Therefore, just assign the container users to host UID/GID.
hostUID := util.FsUserFrom(volumeToMount.Pod)