From b0b6fd035a3a092d1e87a0f276fa8df241526b0d Mon Sep 17 00:00:00 2001 From: David Zhu Date: Tue, 26 Feb 2019 11:47:20 -0800 Subject: [PATCH] Add feature gate check for migration at beginning of useCSIPlugin check --- pkg/volume/util/operationexecutor/operation_generator.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/volume/util/operationexecutor/operation_generator.go b/pkg/volume/util/operationexecutor/operation_generator.go index 9cbea4f3d70..92c54355535 100644 --- a/pkg/volume/util/operationexecutor/operation_generator.go +++ b/pkg/volume/util/operationexecutor/operation_generator.go @@ -1535,6 +1535,9 @@ func isDeviceOpened(deviceToDetach AttachedVolume, mounter mount.Interface) (boo // TODO(dyzz): need to also add logic to check CSINodeInfo for Kubelet migration status func useCSIPlugin(vpm *volume.VolumePluginMgr, spec *volume.Spec) bool { + if !utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) { + return false + } if csilib.IsPVMigratable(spec.PersistentVolume) || csilib.IsInlineMigratable(spec.Volume) { migratable, err := vpm.IsPluginMigratableBySpec(spec) if err == nil && migratable {