From 86fa4792733331267313cd2c3b0820bb79341761 Mon Sep 17 00:00:00 2001 From: Akanksha Kumari Date: Mon, 12 Sep 2022 23:00:00 +0530 Subject: [PATCH] Call SetupDevice only if Volume is not globally Mounted --- 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 80f22a0108c..79c232d85ce 100644 --- a/pkg/volume/util/operationexecutor/operation_generator.go +++ b/pkg/volume/util/operationexecutor/operation_generator.go @@ -1114,7 +1114,7 @@ func (og *operationGenerator) GenerateMapVolumeFunc( } // Call SetUpDevice if blockVolumeMapper implements CustomBlockVolumeMapper - if customBlockVolumeMapper, ok := blockVolumeMapper.(volume.CustomBlockVolumeMapper); ok { + if customBlockVolumeMapper, ok := blockVolumeMapper.(volume.CustomBlockVolumeMapper); ok && actualStateOfWorld.GetDeviceMountState(volumeToMount.VolumeName) != DeviceGloballyMounted { var mapErr error stagingPath, mapErr = customBlockVolumeMapper.SetUpDevice() if mapErr != nil {