Call MountDevice only once

Cann MountDevice only when the volume was not device-mounted before.
This commit is contained in:
Jan Safranek
2020-11-06 17:33:07 +01:00
parent b3b53cbf63
commit 6060c57ba3

View File

@@ -568,7 +568,7 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
DevicePath: devicePath,
}
if volumeDeviceMounter != nil {
if volumeDeviceMounter != nil && actualStateOfWorld.GetDeviceMountState(volumeToMount.VolumeName) != DeviceGloballyMounted {
deviceMountPath, err :=
volumeDeviceMounter.GetDeviceMountPath(volumeToMount.VolumeSpec)
if err != nil {