From 6060c57ba3a944bd133968fd669980c97af846c6 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 6 Nov 2020 17:33:07 +0100 Subject: [PATCH] Call MountDevice only once Cann MountDevice only when the volume was not device-mounted before. --- pkg/volume/util/operationexecutor/operation_generator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/util/operationexecutor/operation_generator.go b/pkg/volume/util/operationexecutor/operation_generator.go index 142cd5acfde..50ee980b5e6 100644 --- a/pkg/volume/util/operationexecutor/operation_generator.go +++ b/pkg/volume/util/operationexecutor/operation_generator.go @@ -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 {