From 7c2b1f47520e21b8bed1d53ee5f7e0767c27186f Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Mon, 28 Nov 2016 17:46:54 -0800 Subject: [PATCH] Remove setup-node, which is not needed after we run the whole test as root. --- hack/make-rules/test-e2e-node.sh | 2 +- hack/verify-flags/known-flags.txt | 1 - .../jenkins/benchmark/jenkins-benchmark.properties | 1 - .../cri_validation/jenkins-benchmark.properties | 1 - .../jenkins/cri_validation/jenkins-pull.properties | 1 - .../cri_validation/jenkins-serial.properties | 1 - .../cri_validation/jenkins-validation.properties | 1 - .../docker_validation/jenkins-perf.properties | 1 - .../docker_validation/jenkins-validation.properties | 1 - test/e2e_node/jenkins/e2e-node-jenkins.sh | 2 +- test/e2e_node/jenkins/jenkins-ci.properties | 1 - test/e2e_node/jenkins/jenkins-flaky.properties | 1 - test/e2e_node/jenkins/jenkins-pull.properties | 1 - test/e2e_node/jenkins/jenkins-serial.properties | 1 - test/e2e_node/jenkins/template.properties | 2 -- test/e2e_node/remote/remote.go | 13 +------------ test/e2e_node/runner/remote/run_remote.go | 9 ++++----- 17 files changed, 7 insertions(+), 33 deletions(-) diff --git a/hack/make-rules/test-e2e-node.sh b/hack/make-rules/test-e2e-node.sh index d77385fd4ef..9ab03575e24 100755 --- a/hack/make-rules/test-e2e-node.sh +++ b/hack/make-rules/test-e2e-node.sh @@ -128,7 +128,7 @@ if [ $remote = true ] ; then --zone="$zone" --project="$project" --gubernator="$gubernator" \ --hosts="$hosts" --images="$images" --cleanup="$cleanup" \ --results-dir="$artifacts" --ginkgo-flags="$ginkgoflags" \ - --image-project="$image_project" --instance-name-prefix="$instance_prefix" --setup-node="true" \ + --image-project="$image_project" --instance-name-prefix="$instance_prefix" \ --delete-instances="$delete_instances" --test_args="$test_args" --instance-metadata="$metadata" \ 2>&1 | tee -i "${artifacts}/build-log.txt" exit $? diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index d41cf8d7f1e..54ac50c9b47 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -545,7 +545,6 @@ service-node-ports service-overrides service-sync-period session-affinity -setup-node show-all show-events show-kind diff --git a/test/e2e_node/jenkins/benchmark/jenkins-benchmark.properties b/test/e2e_node/jenkins/benchmark/jenkins-benchmark.properties index 5c16e5c233e..d07b60cf833 100644 --- a/test/e2e_node/jenkins/benchmark/jenkins-benchmark.properties +++ b/test/e2e_node/jenkins/benchmark/jenkins-benchmark.properties @@ -4,7 +4,6 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]"' -SETUP_NODE=false TEST_ARGS='--feature-gates=DynamicKubeletConfig=true' KUBELET_ARGS='--experimental-cgroups-per-qos=true --cgroup-root=/' PARALLELISM=1 diff --git a/test/e2e_node/jenkins/cri_validation/jenkins-benchmark.properties b/test/e2e_node/jenkins/cri_validation/jenkins-benchmark.properties index ded60ac4e24..7752ba79487 100644 --- a/test/e2e_node/jenkins/cri_validation/jenkins-benchmark.properties +++ b/test/e2e_node/jenkins/cri_validation/jenkins-benchmark.properties @@ -4,7 +4,6 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]"' -SETUP_NODE=false TEST_ARGS='--feature-gates=DynamicKubeletConfig=true,StreamingProxyRedirects=true' KUBELET_ARGS='--experimental-cri=true' PARALLELISM=1 diff --git a/test/e2e_node/jenkins/cri_validation/jenkins-pull.properties b/test/e2e_node/jenkins/cri_validation/jenkins-pull.properties index 14aba2b2e67..9bdcf664442 100644 --- a/test/e2e_node/jenkins/cri_validation/jenkins-pull.properties +++ b/test/e2e_node/jenkins/cri_validation/jenkins-pull.properties @@ -4,6 +4,5 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-pr-node-e2e CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]|\[Slow\]|\[Serial\]" --flakeAttempts=2' -SETUP_NODE=false TEST_ARGS='--feature-gates=StreamingProxyRedirects=true' KUBELET_ARGS='--experimental-cri=true' diff --git a/test/e2e_node/jenkins/cri_validation/jenkins-serial.properties b/test/e2e_node/jenkins/cri_validation/jenkins-serial.properties index da2c52be182..2a165e8cd25 100644 --- a/test/e2e_node/jenkins/cri_validation/jenkins-serial.properties +++ b/test/e2e_node/jenkins/cri_validation/jenkins-serial.properties @@ -4,7 +4,6 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--focus="\[Serial\]" --skip="\[Flaky\]|\[Benchmark\]"' -SETUP_NODE=false TEST_ARGS='--feature-gates=DynamicKubeletConfig=true,StreamingProxyRedirects=true' KUBELET_ARGS='--experimental-cri=true' PARALLELISM=1 diff --git a/test/e2e_node/jenkins/cri_validation/jenkins-validation.properties b/test/e2e_node/jenkins/cri_validation/jenkins-validation.properties index af26d386e7d..d413fb962bd 100644 --- a/test/e2e_node/jenkins/cri_validation/jenkins-validation.properties +++ b/test/e2e_node/jenkins/cri_validation/jenkins-validation.properties @@ -4,7 +4,6 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"' -SETUP_NODE=false TEST_ARGS='--feature-gates=StreamingProxyRedirects=true' KUBELET_ARGS='--experimental-cri=true' TIMEOUT=1h diff --git a/test/e2e_node/jenkins/docker_validation/jenkins-perf.properties b/test/e2e_node/jenkins/docker_validation/jenkins-perf.properties index 833e7a0a9b2..46d01d3dedc 100644 --- a/test/e2e_node/jenkins/docker_validation/jenkins-perf.properties +++ b/test/e2e_node/jenkins/docker_validation/jenkins-perf.properties @@ -18,5 +18,4 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]"' -SETUP_NODE=true PARALLELISM=1 diff --git a/test/e2e_node/jenkins/docker_validation/jenkins-validation.properties b/test/e2e_node/jenkins/docker_validation/jenkins-validation.properties index ace76ca7ae9..34c628d241c 100644 --- a/test/e2e_node/jenkins/docker_validation/jenkins-validation.properties +++ b/test/e2e_node/jenkins/docker_validation/jenkins-validation.properties @@ -14,5 +14,4 @@ GCE_PROJECT=k8s-jkns-ci-node-e2e GCE_INSTANCE_METADATA="user-data<${GCI_CLOUD_INIT},gci-docker-version=${DOCKER_VERSION}" CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"' -SETUP_NODE=true TIMEOUT=1h diff --git a/test/e2e_node/jenkins/e2e-node-jenkins.sh b/test/e2e_node/jenkins/e2e-node-jenkins.sh index 7e035f9dbb6..59db2c3b43a 100755 --- a/test/e2e_node/jenkins/e2e-node-jenkins.sh +++ b/test/e2e_node/jenkins/e2e-node-jenkins.sh @@ -46,5 +46,5 @@ go run test/e2e_node/runner/remote/run_remote.go --logtostderr --vmodule=*=4 -- --images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \ --image-config-file="$GCE_IMAGE_CONFIG_PATH" --cleanup="$CLEANUP" \ --results-dir="$ARTIFACTS" --ginkgo-flags="--nodes=$PARALLELISM $GINKGO_FLAGS" \ - --test-timeout="$TIMEOUT" --setup-node="$SETUP_NODE" --test_args="$TEST_ARGS --kubelet-flags=\"$KUBELET_ARGS\"" \ + --test-timeout="$TIMEOUT" --test_args="$TEST_ARGS --kubelet-flags=\"$KUBELET_ARGS\"" \ --instance-metadata="$GCE_INSTANCE_METADATA" diff --git a/test/e2e_node/jenkins/jenkins-ci.properties b/test/e2e_node/jenkins/jenkins-ci.properties index 94b27cca1f8..31330487733 100644 --- a/test/e2e_node/jenkins/jenkins-ci.properties +++ b/test/e2e_node/jenkins/jenkins-ci.properties @@ -4,6 +4,5 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"' -SETUP_NODE=false KUBELET_ARGS='--experimental-cgroups-per-qos=true --cgroup-root=/' TIMEOUT=1h diff --git a/test/e2e_node/jenkins/jenkins-flaky.properties b/test/e2e_node/jenkins/jenkins-flaky.properties index 44e434dbe05..6dd75341855 100644 --- a/test/e2e_node/jenkins/jenkins-flaky.properties +++ b/test/e2e_node/jenkins/jenkins-flaky.properties @@ -4,5 +4,4 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--focus="\[Flaky\]"' -SETUP_NODE=false KUBELET_ARGS='--experimental-cgroups-per-qos=true --cgroup-root=/' diff --git a/test/e2e_node/jenkins/jenkins-pull.properties b/test/e2e_node/jenkins/jenkins-pull.properties index f25e173c854..d727b590dc3 100644 --- a/test/e2e_node/jenkins/jenkins-pull.properties +++ b/test/e2e_node/jenkins/jenkins-pull.properties @@ -4,6 +4,5 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-pr-node-e2e CLEANUP=true GINKGO_FLAGS='--skip="\[Flaky\]|\[Slow\]|\[Serial\]" --flakeAttempts=2' -SETUP_NODE=false KUBELET_ARGS='--experimental-cgroups-per-qos=true --cgroup-root=/' diff --git a/test/e2e_node/jenkins/jenkins-serial.properties b/test/e2e_node/jenkins/jenkins-serial.properties index 4227cc8154c..acaafc45d26 100644 --- a/test/e2e_node/jenkins/jenkins-serial.properties +++ b/test/e2e_node/jenkins/jenkins-serial.properties @@ -4,7 +4,6 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--focus="\[Serial\]" --skip="\[Flaky\]|\[Benchmark\]"' -SETUP_NODE=false TEST_ARGS='--feature-gates=DynamicKubeletConfig=true' KUBELET_ARGS='--experimental-cgroups-per-qos=true --cgroup-root=/' PARALLELISM=1 diff --git a/test/e2e_node/jenkins/template.properties b/test/e2e_node/jenkins/template.properties index 5b9377eb4a4..9e43c8e78f0 100644 --- a/test/e2e_node/jenkins/template.properties +++ b/test/e2e_node/jenkins/template.properties @@ -15,8 +15,6 @@ GCE_PROJECT= GCE_IMAGE_PROJECT= # If true, delete instances created from GCE_IMAGES/GCE_IMAGE_CONFIG_PATH and files copied to GCE_HOSTS CLEANUP=true -# If true, current user will be added to the docker group on test node -SETUP_NODE=false # KUBELET_ARGS are the arguments passed to kubelet. The args will override corresponding default kubelet # setting in the test framework and --kubelet-flags in TEST_ARGS. # If true QoS Cgroup Hierarchy is created and tests specifc to the cgroup hierarchy run diff --git a/test/e2e_node/remote/remote.go b/test/e2e_node/remote/remote.go index be74b187c05..69a4cc45860 100644 --- a/test/e2e_node/remote/remote.go +++ b/test/e2e_node/remote/remote.go @@ -152,18 +152,7 @@ func CreateTestArchive() (string, error) { } // Returns the command output, whether the exit was ok, and any errors -func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string, setupNode bool, testArgs string, ginkgoFlags string) (string, bool, error) { - if setupNode { - uname, err := user.Current() - if err != nil { - return "", false, fmt.Errorf("could not find username: %v", err) - } - output, err := SSH(host, "usermod", "-a", "-G", "docker", uname.Username) - if err != nil { - return "", false, fmt.Errorf("instance %s not running docker daemon - Command failed: %s", host, output) - } - } - +func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string, testArgs string, ginkgoFlags string) (string, bool, error) { // Create the temp staging directory glog.Infof("Staging test binaries on %s", host) workspace := fmt.Sprintf("/tmp/node-e2e-%s", getTimestamp()) diff --git a/test/e2e_node/runner/remote/run_remote.go b/test/e2e_node/runner/remote/run_remote.go index 35a09485ed4..7f1b95e6f98 100644 --- a/test/e2e_node/runner/remote/run_remote.go +++ b/test/e2e_node/runner/remote/run_remote.go @@ -55,7 +55,6 @@ var hosts = flag.String("hosts", "", "hosts to test") var cleanup = flag.Bool("cleanup", true, "If true remove files from remote hosts and delete temporary instances") var deleteInstances = flag.Bool("delete-instances", true, "If true, delete any instances created") var buildOnly = flag.Bool("build-only", false, "If true, build e2e_node_test.tar.gz and exit.") -var setupNode = flag.Bool("setup-node", false, "When true, current user will be added to docker group on the test machine") var instanceMetadata = flag.String("instance-metadata", "", "key/value metadata for instances separated by '=' or '<', 'k=v' means the key is 'k' and the value is 'v'; 'k