From 2189acdd4fd4d2111d43499ce9481fc25bb4b3a5 Mon Sep 17 00:00:00 2001 From: mdshuai Date: Tue, 15 Nov 2016 15:03:56 +0800 Subject: [PATCH] [kubelet]update --cgroups-per-qos to --experimental-cgroups-per-qos --- Makefile | 2 +- docs/devel/e2e-node-tests.md | 4 ++-- docs/proposals/pod-resource-management.md | 2 +- hack/local-up-cluster.sh | 6 +++--- pkg/apis/componentconfig/types.go | 2 +- pkg/generated/openapi/zz_generated.openapi.go | 2 +- pkg/kubelet/cm/container_manager_linux.go | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 7fe472ee3630c..bce35339053c9 100644 --- a/Makefile +++ b/Makefile @@ -181,7 +181,7 @@ test-e2e: ginkgo generated_files # Example: # make test-e2e-node FOCUS=Kubelet SKIP=container # make test-e2e-node REMOTE=true DELETE_INSTANCES=true -# make test-e2e-node TEST_ARGS="--cgroups-per-qos=true" +# make test-e2e-node TEST_ARGS="--experimental-cgroups-per-qos=true" # Build and run tests. .PHONY: test-e2e-node test-e2e-node: ginkgo generated_files diff --git a/docs/devel/e2e-node-tests.md b/docs/devel/e2e-node-tests.md index 7811344096eac..5e5f5b49f4afb 100644 --- a/docs/devel/e2e-node-tests.md +++ b/docs/devel/e2e-node-tests.md @@ -208,10 +208,10 @@ make test_e2e_node TEST_ARGS="--disable-kubenet=false" # disable kubenet ## Additional QoS Cgroups Hierarchy level testing -For testing with the QoS Cgroup Hierarchy enabled, you can pass --cgroups-per-qos flag as an argument into Ginkgo using TEST_ARGS +For testing with the QoS Cgroup Hierarchy enabled, you can pass --experimental-cgroups-per-qos flag as an argument into Ginkgo using TEST_ARGS ```sh -make test_e2e_node TEST_ARGS="--cgroups-per-qos=true" +make test_e2e_node TEST_ARGS="--experimental-cgroups-per-qos=true" ``` # Notes on tests run by the Kubernetes project during pre-, post- submit. diff --git a/docs/proposals/pod-resource-management.md b/docs/proposals/pod-resource-management.md index 2d8643cc07128..39f939e3addda 100644 --- a/docs/proposals/pod-resource-management.md +++ b/docs/proposals/pod-resource-management.md @@ -341,7 +341,7 @@ $ROOT ## Implementation Plan The implementation plan is outlined in the next sections. -We will have a 'cgroups-per-qos' flag to specify if the user wants to use the QoS based cgroup hierarchy. The flag would be set to false by default at least in v1.4. +We will have a 'experimental-cgroups-per-qos' flag to specify if the user wants to use the QoS based cgroup hierarchy. The flag would be set to false by default at least in v1.5. #### Top level Cgroups for QoS tiers diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 194bf3c8790e0..7b5012e48fcc3 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -33,9 +33,9 @@ NET_PLUGIN_DIR=${NET_PLUGIN_DIR:-""} KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. SERVICE_CLUSTER_IP_RANGE=${SERVICE_CLUSTER_IP_RANGE:-10.0.0.0/24} # if enabled, must set CGROUP_ROOT -CGROUPS_PER_QOS=${CGROUPS_PER_QOS:-false} +EXPERIMENTAL_CGROUPS_PER_QOS=${EXPERIMENTAL_CGROUPS_PER_QOS:-false} # this is not defaulted to preserve backward compatibility. -# if CGROUPS_PER_QOS is enabled, recommend setting to / +# if EXPERIMENTAL_CGROUPS_PER_QOS is enabled, recommend setting to / CGROUP_ROOT=${CGROUP_ROOT:""} # name of the cgroup driver, i.e. cgroupfs or systemd CGROUP_DRIVER=${CGROUP_DRIVER:-""} @@ -502,7 +502,7 @@ function start_kubelet { --feature-gates="${FEATURE_GATES}" \ --cpu-cfs-quota=${CPU_CFS_QUOTA} \ --enable-controller-attach-detach="${ENABLE_CONTROLLER_ATTACH_DETACH}" \ - --cgroups-per-qos=${CGROUPS_PER_QOS} \ + --experimental-cgroups-per-qos=${EXPERIMENTAL_CGROUPS_PER_QOS} \ --cgroup-driver=${CGROUP_DRIVER} \ --cgroup-root=${CGROUP_ROOT} \ ${auth_args} \ diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index b635e6d347b7e..45dd4de00ba17 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -307,7 +307,7 @@ type KubeletConfiguration struct { // +optional SystemCgroups string `json:"systemCgroups,omitempty"` // CgroupRoot is the root cgroup to use for pods. - // If CgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy. + // If ExperimentalCgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy. // +optional CgroupRoot string `json:"cgroupRoot,omitempty"` // containerRuntime is the container runtime to use. diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index e405be86f0137..2401d9fd8ae9b 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -2630,7 +2630,7 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ }, "cgroupRoot": { SchemaProps: spec.SchemaProps{ - Description: "CgroupRoot is the root cgroup to use for pods. If CgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy.", + Description: "CgroupRoot is the root cgroup to use for pods. If ExperimentalCgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy.", Type: []string{"string"}, Format: "", }, diff --git a/pkg/kubelet/cm/container_manager_linux.go b/pkg/kubelet/cm/container_manager_linux.go index 14bf7f93f8b86..f7546c6e0e66a 100644 --- a/pkg/kubelet/cm/container_manager_linux.go +++ b/pkg/kubelet/cm/container_manager_linux.go @@ -209,7 +209,7 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I if nodeConfig.CgroupsPerQOS { // this does default to / when enabled, but this tests against regressions. if nodeConfig.CgroupRoot == "" { - return nil, fmt.Errorf("invalid configuration: cgroups-per-qos was specified and cgroup-root was not specified. To enable the QoS cgroup hierarchy you need to specify a valid cgroup-root") + return nil, fmt.Errorf("invalid configuration: experimental-cgroups-per-qos was specified and cgroup-root was not specified. To enable the QoS cgroup hierarchy you need to specify a valid cgroup-root") } // we need to check that the cgroup root actually exists for each subsystem