diff --git a/pkg/volume/azure_dd/azure_common_test.go b/pkg/volume/azure_dd/azure_common_test.go index fc9399e2d1a..0089bb87654 100644 --- a/pkg/volume/azure_dd/azure_common_test.go +++ b/pkg/volume/azure_dd/azure_common_test.go @@ -64,7 +64,6 @@ var ( lunStr = "1" diskPath = "4:0:0:" + lunStr devName = "sdd" - lun1 = 2 lunStr1 = "2" diskPath1 = "3:0:0:" + lunStr1 devName1 = "sde" diff --git a/pkg/volume/csi/csi_plugin.go b/pkg/volume/csi/csi_plugin.go index f90878302ba..5f5f9f0b0ca 100644 --- a/pkg/volume/csi/csi_plugin.go +++ b/pkg/volume/csi/csi_plugin.go @@ -60,8 +60,6 @@ const ( CsiResyncPeriod = time.Minute ) -var deprecatedSocketDirVersions = []string{"0.1.0", "0.2.0", "0.3.0", "0.4.0"} - type csiPlugin struct { host volume.VolumeHost blockEnabled bool diff --git a/pkg/volume/flexvolume/driver-call.go b/pkg/volume/flexvolume/driver-call.go index 6eac275c9dc..189a40f1d62 100644 --- a/pkg/volume/flexvolume/driver-call.go +++ b/pkg/volume/flexvolume/driver-call.go @@ -52,7 +52,6 @@ const ( optionReadWrite = "kubernetes.io/readwrite" optionKeySecret = "kubernetes.io/secret" optionFSGroup = "kubernetes.io/mounterArgs.FsGroup" - optionMountsDir = "kubernetes.io/mountsDir" optionPVorVolumeName = "kubernetes.io/pvOrVolumeName" optionKeyPodName = "kubernetes.io/pod.name" diff --git a/pkg/volume/flexvolume/flexvolume_test.go b/pkg/volume/flexvolume/flexvolume_test.go index 269d94b0112..4b0168b1b44 100644 --- a/pkg/volume/flexvolume/flexvolume_test.go +++ b/pkg/volume/flexvolume/flexvolume_test.go @@ -74,59 +74,6 @@ exit 1 echo -n $@ &> {{.OutputFile}} ` -const execScriptTempl2 = `#!/usr/bin/env bash -if [ "$1" == "init" -a $# -eq 1 ]; then - echo -n '{ - "status": "Success" - }' - exit 0 -fi - -if [ "$1" == "getvolumename" -a $# -eq 2 ]; then - echo -n '{ - "status": "Success", - "volumeName": "fakevolume" - }' - exit 0 -elif [ "$1" == "mount" -a $# -eq 4 ]; then - PATH=$2 - /bin/mkdir -p $PATH - if [ $? -ne 0 ]; then - echo -n '{ - "status": "Failure", - "reason": "Failed to create $PATH" - }' - exit 1 - fi - echo -n '{ - "status": "Success" - }' - exit 0 -elif [ "$1" == "unmount" -a $# -eq 2 ]; then - PATH=$2 - /bin/rm -r $PATH - if [ $? -ne 0 ]; then - echo -n '{ - "status": "Failure", - "reason": "Failed to cleanup $PATH" - }' - exit 1 - fi - echo -n '{ - "status": "Success" - }' - exit 0 -fi - -echo -n '{ - "status": "Not Supported" -}' -exit 1 - -# Direct the arguments to a file to be tested against later -echo -n $@ &> {{.OutputFile}} -` - func installPluginUnderTest(t *testing.T, vendorName, plugName, tmpDir string, execScriptTempl string, execTemplateData *map[string]interface{}) { vendoredName := plugName if vendorName != "" { diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 52ff8cb1328..1bf0402fff4 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -88,13 +88,12 @@ const ( // default values, but they play a different role and // could take a different value. Only thing we need is: // absGidMin <= defGidMin <= defGidMax <= absGidMax - absoluteGidMin = 2000 - absoluteGidMax = math.MaxInt32 - linuxGlusterMountBinary = "mount.glusterfs" - heketiAnn = "heketi-dynamic-provisioner" - glusterTypeAnn = "gluster.org/type" - glusterDescAnn = "Gluster-Internal: Dynamically provisioned PV" - heketiVolIDAnn = "gluster.kubernetes.io/heketi-volume-id" + absoluteGidMin = 2000 + absoluteGidMax = math.MaxInt32 + heketiAnn = "heketi-dynamic-provisioner" + glusterTypeAnn = "gluster.org/type" + glusterDescAnn = "Gluster-Internal: Dynamically provisioned PV" + heketiVolIDAnn = "gluster.kubernetes.io/heketi-volume-id" // Error string returned by heketi errIDNotFound = "Id not found" diff --git a/pkg/volume/rbd/rbd.go b/pkg/volume/rbd/rbd.go index cd953db711c..9f127b67c96 100644 --- a/pkg/volume/rbd/rbd.go +++ b/pkg/volume/rbd/rbd.go @@ -72,7 +72,6 @@ const ( rbdDefaultAdminId = "admin" rbdDefaultAdminSecretNamespace = "default" rbdDefaultPool = "rbd" - rbdDefaultUserId = rbdDefaultAdminId ) func getPath(uid types.UID, volName string, host volume.VolumeHost) string { diff --git a/pkg/volume/rbd/rbd_util.go b/pkg/volume/rbd/rbd_util.go index b74e994cfd1..73052073341 100644 --- a/pkg/volume/rbd/rbd_util.go +++ b/pkg/volume/rbd/rbd_util.go @@ -47,7 +47,6 @@ import ( const ( imageWatcherStr = "watcher=" - imageSizeStr = "size " kubeLockMagic = "kubelet_lock_magic_" // The following three values are used for 30 seconds timeout // while waiting for RBD Watcher to expire. diff --git a/pkg/volume/storageos/storageos_util_test.go b/pkg/volume/storageos/storageos_util_test.go index b3dabba28a1..05eae46c8e5 100644 --- a/pkg/volume/storageos/storageos_util_test.go +++ b/pkg/volume/storageos/storageos_util_test.go @@ -30,7 +30,6 @@ import ( "testing" ) -var testAPISecretName = "storageos-api" var testVolName = "storageos-test-vol" var testPVName = "storageos-test-pv" var testNamespace = "storageos-test-namespace" diff --git a/pkg/volume/util/fsquota/quota_linux_test.go b/pkg/volume/util/fsquota/quota_linux_test.go index 06119c738b5..9067b33f3b1 100644 --- a/pkg/volume/util/fsquota/quota_linux_test.go +++ b/pkg/volume/util/fsquota/quota_linux_test.go @@ -43,24 +43,6 @@ tmpfs /tmp tmpfs rw,nosuid,nodev 0 0 /dev/sdb1 /virt xfs rw,noatime,attr2,inode64,usrquota,prjquota 0 0 ` -const dummyMountDataPquota = `tmpfs /tmp tmpfs rw,nosuid,nodev 0 0 -/dev/sda1 /boot ext4 rw,relatime 0 0 -/dev/mapper/fedora-root / ext4 rw,noatime 0 0 -/dev/mapper/fedora-home /home ext4 rw,noatime 0 0 -/dev/sdb1 /mnt/virt xfs rw,noatime,attr2,inode64,usrquota,prjquota 0 0 -` -const dummyMountDataNoPquota = `tmpfs /tmp tmpfs rw,nosuid,nodev 0 0 -/dev/sda1 /boot ext4 rw,relatime 0 0 -/dev/mapper/fedora-root / ext4 rw,noatime 0 0 -/dev/mapper/fedora-home /home ext4 rw,noatime 0 0 -/dev/sdb1 /mnt/virt xfs rw,noatime,attr2,inode64,usrquota 0 0 -` - -const dummyMountTest = `/dev/sda1 / ext4 rw,noatime 0 0 -/dev/sda2 /quota ext4 rw,prjquota 0 0 -/dev/sda3 /noquota ext4 rw 0 0 -` - func dummyFakeMount1() mount.Interface { return &mount.FakeMounter{ MountPoints: []mount.MountPoint{