diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 4c82a048c6..742d53b12a 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -149,6 +149,12 @@ TEST_CLUSTER_RESYNC_PERIOD="${TEST_CLUSTER_RESYNC_PERIOD:---min-resync-period=3m TEST_CLUSTER_API_CONTENT_TYPE="${TEST_CLUSTER_API_CONTENT_TYPE:-}" KUBELET_TEST_ARGS="${KUBELET_TEST_ARGS:-} --max-pods=110 --serialize-image-pulls=false --outofdisk-transition-frequency=0 ${TEST_CLUSTER_API_CONTENT_TYPE}" +if [[ "${NODE_OS_DISTRIBUTION}" == "gci" ]]; then + NODE_KUBELET_TEST_ARGS=" --experimental-kernel-memcg-notification=true" +fi +if [[ "${MASTER_OS_DISTRIBUTION}" == "gci" ]]; then + MASTER_KUBELET_TEST_ARGS=" --experimental-kernel-memcg-notification=true" +fi APISERVER_TEST_ARGS="${APISERVER_TEST_ARGS:-} --runtime-config=extensions/v1beta1 ${TEST_CLUSTER_DELETE_COLLECTION_WORKERS} ${TEST_CLUSTER_MAX_REQUESTS_INFLIGHT}" CONTROLLER_MANAGER_TEST_ARGS="${CONTROLLER_MANAGER_TEST_ARGS:-} ${TEST_CLUSTER_RESYNC_PERIOD} ${TEST_CLUSTER_API_CONTENT_TYPE}" SCHEDULER_TEST_ARGS="${SCHEDULER_TEST_ARGS:-} ${TEST_CLUSTER_API_CONTENT_TYPE}" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index f6c6304973..d77a1e187a 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -681,6 +681,7 @@ function start-kubelet { flags+=" --port=${KUBELET_PORT}" fi if [[ "${KUBERNETES_MASTER:-}" == "true" ]]; then + flags+="${MASTER_KUBELET_TEST_ARGS:-}" flags+=" --enable-debugging-handlers=false" flags+=" --hairpin-mode=none" if [[ "${REGISTER_MASTER_KUBELET:-false}" == "true" ]]; then @@ -691,6 +692,7 @@ function start-kubelet { flags+=" --pod-cidr=${MASTER_IP_RANGE}" fi else # For nodes + flags+="${NODE_KUBELET_TEST_ARGS:-}" flags+=" --enable-debugging-handlers=true" flags+=" --api-servers=https://${KUBERNETES_MASTER_NAME}" if [[ "${HAIRPIN_MODE:-}" == "promiscuous-bridge" ]] || \ diff --git a/test/e2e_node/jenkins/jenkins-memcg-serial.properties b/test/e2e_node/jenkins/jenkins-memcg-serial.properties index 4315f9f0a5..8eca03047a 100644 --- a/test/e2e_node/jenkins/jenkins-memcg-serial.properties +++ b/test/e2e_node/jenkins/jenkins-memcg-serial.properties @@ -13,7 +13,7 @@ CLEANUP=true # gci-docker-version specifies docker version in GCI image. GCE_INSTANCE_METADATA="user-data<${GCI_CLOUD_INIT},gci-docker-version=${DOCKER_VERSION},gci-update-strategy=update_disabled" GINKGO_FLAGS='--focus="MemoryEviction" --skip=""' -TEST_ARGS='--kubelet-flags=--experimental-kernel-memcg-notification=true --feature-gates=DynamicKubeletConfig=true' +TEST_ARGS='--kubelet-flags=--feature-gates=DynamicKubeletConfig=true' KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/' PARALLELISM=1 TIMEOUT=1h diff --git a/test/e2e_node/remote/node_e2e.go b/test/e2e_node/remote/node_e2e.go index a087673f36..613d387a5a 100644 --- a/test/e2e_node/remote/node_e2e.go +++ b/test/e2e_node/remote/node_e2e.go @@ -108,9 +108,9 @@ func tarAddCOSMounter(tar string) error { return nil } -// updateCOSMounterPath updates kubelet flags to set gci mounter path. This will only take effect for +// updateCOSKubeletFlags updates kubelet flags to set gci mounter path, and enables memcg notifications. This will only take effect for // GCI/COS image. -func updateCOSMounterPath(args, host, workspace string) (string, error) { +func updateCOSKubeletFlags(args, host, workspace string) (string, error) { // Determine if tests will run on a GCI/COS node. output, err := SSH(host, "cat", "/etc/os-release") if err != nil { @@ -145,7 +145,7 @@ func updateCOSMounterPath(args, host, workspace string) (string, error) { return args, fmt.Errorf("unabled to chmod 544 GCI/COS mounter script. Err: %v, Output:\n%s", err, output) } // Insert args at beginning of test args, so any values from command line take precedence - args = fmt.Sprintf("--kubelet-flags=--experimental-mounter-path=%s ", mounterPath) + args + args = fmt.Sprintf("--kubelet-flags='--experimental-kernel-memcg-notification=true --experimental-mounter-path=%s'", mounterPath) + args return args, nil } @@ -164,7 +164,7 @@ func (n *NodeE2ERemote) RunTest(host, workspace, results, junitFilePrefix, testA // Kill any running node processes cleanupNodeProcesses(host) - testArgs, err := updateCOSMounterPath(testArgs, host, workspace) + testArgs, err := updateCOSKubeletFlags(testArgs, host, workspace) if err != nil { return "", err }