Skip to content

Commit

Permalink
Remove legacy gci flex directory from e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
msau42 committed Nov 27, 2018
1 parent 8848740 commit 6032a1e
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions test/e2e/storage/flexvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ const (
// On gci, root is read-only and controller-manager containerized. Assume
// controller-manager has started with --flex-volume-plugin-dir equal to this
// (see cluster/gce/config-test.sh)
gciVolumePluginDir = "/home/kubernetes/flexvolume"
gciVolumePluginDirLegacy = "/etc/srv/kubernetes/kubelet-plugins/volume/exec"
gciVolumePluginDirVersion = "1.10.0"
detachTimeout = 10 * time.Second
gciVolumePluginDir = "/home/kubernetes/flexvolume"
detachTimeout = 10 * time.Second
)

// testFlexVolume tests that a client pod using a given flexvolume driver
Expand Down Expand Up @@ -130,24 +128,7 @@ func uninstallFlex(c clientset.Interface, node *v1.Node, vendor, driver string)
func getFlexDir(c clientset.Interface, node *v1.Node, vendor, driver string) string {
volumePluginDir := defaultVolumePluginDir
if framework.ProviderIs("gce") {
if node == nil && framework.MasterOSDistroIs("gci", "ubuntu") {
v, err := getMasterVersion(c)
if err != nil {
framework.Failf("Error getting master version: %v", err)
}

if v.AtLeast(versionutil.MustParseGeneric(gciVolumePluginDirVersion)) {
volumePluginDir = gciVolumePluginDir
} else {
volumePluginDir = gciVolumePluginDirLegacy
}
} else if node != nil && framework.NodeOSDistroIs("gci", "ubuntu") {
if getNodeVersion(node).AtLeast(versionutil.MustParseGeneric(gciVolumePluginDirVersion)) {
volumePluginDir = gciVolumePluginDir
} else {
volumePluginDir = gciVolumePluginDirLegacy
}
}
volumePluginDir = gciVolumePluginDir
}
flexDir := path.Join(volumePluginDir, fmt.Sprintf("/%s~%s/", vendor, driver))
return flexDir
Expand Down

0 comments on commit 6032a1e

Please sign in to comment.