From 127b675a15bdbb07d57eba24fa0652b7b7b41253 Mon Sep 17 00:00:00 2001 From: lala123912 Date: Fri, 5 Mar 2021 09:40:59 +0800 Subject: [PATCH] Remove unused/dead code --- pkg/volume/glusterfs/glusterfs.go | 1 - pkg/volume/util/volumepathhandler/volume_path_handler.go | 6 ++---- pkg/volume/vsphere_volume/vsphere_volume_util.go | 1 - test/e2e/storage/csi_mock_volume.go | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 23391774954..b0abb549430 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -77,7 +77,6 @@ const ( volPrefix = "vol_" dynamicEpSvcPrefix = "glusterfs-dynamic" replicaCount = 3 - durabilityType = "replicate" secretKeyName = "key" // key name used in secret gciLinuxGlusterMountBinaryPath = "/sbin/mount.glusterfs" defaultGidMin = 2000 diff --git a/pkg/volume/util/volumepathhandler/volume_path_handler.go b/pkg/volume/util/volumepathhandler/volume_path_handler.go index e07f457aac3..3009eb34f46 100644 --- a/pkg/volume/util/volumepathhandler/volume_path_handler.go +++ b/pkg/volume/util/volumepathhandler/volume_path_handler.go @@ -30,10 +30,8 @@ import ( ) const ( - losetupPath = "losetup" - statPath = "stat" - ErrDeviceNotFound = "device not found" - ErrDeviceNotSupported = "device not supported" + losetupPath = "losetup" + ErrDeviceNotFound = "device not found" ) // BlockVolumePathHandler defines a set of operations for handling block volume-related operations diff --git a/pkg/volume/vsphere_volume/vsphere_volume_util.go b/pkg/volume/vsphere_volume/vsphere_volume_util.go index ab229b980fc..ab42b35e3ce 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_util.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_util.go @@ -36,7 +36,6 @@ import ( ) const ( - maxRetries = 10 checkSleepDuration = time.Second diskByIDPath = "/dev/disk/by-id/" diskSCSIPrefix = "wwn-0x" diff --git a/test/e2e/storage/csi_mock_volume.go b/test/e2e/storage/csi_mock_volume.go index b785f5d416b..c845feedaa2 100644 --- a/test/e2e/storage/csi_mock_volume.go +++ b/test/e2e/storage/csi_mock_volume.go @@ -1650,7 +1650,6 @@ func podRunning(ctx context.Context, c clientset.Interface, podName, namespace s } const ( - podStartTimeout = 5 * time.Minute poll = 2 * time.Second pvcAsSourceProtectionFinalizer = "snapshot.storage.kubernetes.io/pvc-as-source-protection" volumeSnapshotContentFinalizer = "snapshot.storage.kubernetes.io/volumesnapshotcontent-bound-protection"