Revert "Revert "Merge pull request #35821 from vishh/gci-mounter-scope""
This reverts commit 402116aed4.
This commit is contained in:
@@ -123,8 +123,6 @@ type NodeTestContextType struct {
|
||||
ContainerRuntimeEndpoint string
|
||||
// MounterPath is the path to the program to run to perform a mount
|
||||
MounterPath string
|
||||
// MounterRootfsPath is the path to the root filesystem for the program used to perform a mount in kubelet
|
||||
MounterRootfsPath string
|
||||
}
|
||||
|
||||
type CloudConfig struct {
|
||||
@@ -229,7 +227,6 @@ func RegisterNodeFlags() {
|
||||
flag.BoolVar(&TestContext.EnableCRI, "enable-cri", false, "Enable Container Runtime Interface (CRI) integration.")
|
||||
flag.StringVar(&TestContext.ContainerRuntimeEndpoint, "container-runtime-endpoint", "", "The endpoint of remote container runtime grpc server, mainly used for Remote CRI validation.")
|
||||
flag.StringVar(&TestContext.MounterPath, "experimental-mounter-path", "", "Path of mounter binary. Leave empty to use the default mount.")
|
||||
flag.StringVar(&TestContext.MounterRootfsPath, "experimental-mounter-rootfs-path", "", "Absolute path to root filesystem for the mounter binary.")
|
||||
}
|
||||
|
||||
// overwriteFlagsWithViperConfig finds and writes values to flags using viper as input.
|
||||
|
||||
@@ -273,6 +273,7 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
|
||||
return "", false, fmt.Errorf("Issue detecting node's OS via node's /etc/os-release. Err: %v, Output:\n%s", err, output)
|
||||
}
|
||||
if strings.Contains(output, "ID=gci") {
|
||||
glog.Infof("GCI node and GCI mounter both detected, modifying --experimental-mounter-path accordingly")
|
||||
// Note this implicitly requires the script to be where we expect in the tarball, so if that location changes the error
|
||||
// here will tell us to update the remote test runner.
|
||||
mounterPath := filepath.Join(tmp, "cluster/gce/gci/mounter/mounter")
|
||||
@@ -284,9 +285,6 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
|
||||
// Insert args at beginning of testArgs, so any values from command line take precedence
|
||||
testArgs = fmt.Sprintf("--experimental-mounter-rootfs-path=%s ", mounterRootfsPath) + testArgs
|
||||
testArgs = fmt.Sprintf("--experimental-mounter-path=%s ", mounterPath) + testArgs
|
||||
|
||||
// Temporarily disabled (associated Kubelet flags commented out in k8s.io/kubernetes/test/e2e_node/services/services.go):
|
||||
// glog.Infof("GCI node and GCI mounter both detected, setting --experimental-mounter-path=%q and --experimental-mounter-rootfs-path=%q accordingly", mounterPath, mounterRootfsPath)
|
||||
}
|
||||
|
||||
// Run the tests
|
||||
|
||||
Reference in New Issue
Block a user