Skip to content

Commit

Permalink
Merge pull request kubernetes#28993 from kubernetes/revert-27151-gc-e2e
Browse files Browse the repository at this point in the history
Revert "[garbage collector] add e2e test"
  • Loading branch information
Marek Grabowski authored Jul 15, 2016
2 parents 87d3c74 + f712449 commit 12483d9
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 223 deletions.
1 change: 0 additions & 1 deletion cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ ENABLE_MANIFEST_URL: $(yaml-quote ${ENABLE_MANIFEST_URL:-false})
MANIFEST_URL: $(yaml-quote ${MANIFEST_URL:-})
MANIFEST_URL_HEADER: $(yaml-quote ${MANIFEST_URL_HEADER:-})
NUM_NODES: $(yaml-quote ${NUM_NODES})
ENABLE_GARBAGE_COLLECTOR: $(yaml-quote ${ENABLE_GARBAGE_COLLECTOR:-false})
EOF
if [ -n "${APISERVER_TEST_ARGS:-}" ]; then
cat >>$file <<EOF
Expand Down
2 changes: 0 additions & 2 deletions cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ function start-kube-apiserver {
params+=" --tls-cert-file=/etc/srv/kubernetes/server.cert"
params+=" --tls-private-key-file=/etc/srv/kubernetes/server.key"
params+=" --token-auth-file=/etc/srv/kubernetes/known_tokens.csv"
params+=" --enable-garbage-collector=${ENABLE_GARBAGE_COLLECTOR}"
if [[ -n "${SERVICE_CLUSTER_IP_RANGE:-}" ]]; then
params+=" --service-cluster-ip-range=${SERVICE_CLUSTER_IP_RANGE}"
fi
Expand Down Expand Up @@ -664,7 +663,6 @@ function start-kube-controller-manager {
params+=" --master=127.0.0.1:8080"
params+=" --root-ca-file=/etc/srv/kubernetes/ca.crt"
params+=" --service-account-private-key-file=/etc/srv/kubernetes/server.key"
params+=" --enable-garbage-collector=${ENABLE_GARBAGE_COLLECTOR}"
if [[ -n "${INSTANCE_PREFIX:-}" ]]; then
params+=" --cluster-name=${INSTANCE_PREFIX}"
fi
Expand Down
1 change: 1 addition & 0 deletions cluster/gce/gci/helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function create-node-instance-template {
# It requires a whole slew of assumed variables, partially due to to
# the call to write-master-env. Listing them would be rather
# futile. Instead, we list the required calls to ensure any additional
#
# variables are set:
# ensure-temp-dir
# detect-project
Expand Down
7 changes: 1 addition & 6 deletions cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,7 @@
{% set log_level = pillar['api_server_test_log_level'] -%}
{% endif -%}

{% set enable_garbage_collector = "" -%}
{% if pillar['enable_garbage_collector'] is defined -%}
{% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%}
{% endif -%}

{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector -%}
{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout -%}
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + token_auth_file + " " + bind_address + " " + log_level + " " + advertise_address + " " + proxy_ssh_options + authz_mode + abac_policy_file + webhook_authentication_config + webhook_authorization_config -%}

# test_args has to be kept at the end, so they'll overwrite any prior configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
{% set terminated_pod_gc = "--terminated-pod-gc-threshold=" + pillar['terminated_pod_gc_threshold'] -%}
{% endif -%}

{% set enable_garbage_collector = "" -%}
{% if pillar['enable_garbage_collector'] is defined -%}
{% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%}
{% endif -%}

{% set cloud_provider = "" -%}
{% set cloud_config = "" -%}
{% set cloud_config_mount = "" -%}
Expand Down Expand Up @@ -73,7 +68,7 @@
{% set log_level = pillar['controller_manager_test_log_level'] -%}
{% endif -%}

{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + service_cluster_ip_range + " " + terminated_pod_gc + " " + enable_garbage_collector + " " + cloud_provider + " " + cloud_config + " " + service_account_key + " " + log_level + " " + root_ca_file -%}
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + service_cluster_ip_range + " " + terminated_pod_gc + " " + cloud_provider + " " + cloud_config + " " + service_account_key + " " + log_level + " " + root_ca_file -%}


# test_args has to be kept at the end, so they'll overwrite any prior configuration
Expand Down
6 changes: 2 additions & 4 deletions hack/verify-flags/exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ cluster/photon-controller/util.sh: node_name=${1}
cluster/rackspace/util.sh: local node_ip=$(nova show --minimal ${NODE_NAMES[$i]} \
cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest:{% set params = pillar['autoscaler_mig_config'] + " " + cloud_config -%}
cluster/saltbase/salt/kube-admission-controls/init.sls:{% if 'LimitRanger' in pillar.get('admission_control', '') %}
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest:{% set enable_garbage_collector = pillar['enable_garbage_collector'] -%}
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest:{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector -%}
cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest:{% set enable_garbage_collector = pillar['enable_garbage_collector'] -%}
cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest:{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + service_cluster_ip_range + " " + terminated_pod_gc + " " + enable_garbage_collector + " " + cloud_provider + " " + cloud_config + " " + service_account_key + " " + log_level + " " + root_ca_file -%}
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest:{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout -%}
cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest:{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + service_cluster_ip_range + " " + terminated_pod_gc + " " + cloud_provider + " " + cloud_config + " " + service_account_key + " " + log_level + " " + root_ca_file -%}
cluster/saltbase/salt/kube-proxy/kube-proxy.manifest: {% set api_servers_with_port = api_servers + ":6443" -%}
cluster/saltbase/salt/kube-proxy/kube-proxy.manifest: {% set api_servers_with_port = api_servers -%}
cluster/saltbase/salt/kube-proxy/kube-proxy.manifest: {% set cluster_cidr=" --cluster-cidr=" + pillar['cluster_cidr'] %}
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/garbagecollector/garbagecollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ func (gc *GarbageCollector) processItem(item *node) error {
}

func (gc *GarbageCollector) Run(workers int, stopCh <-chan struct{}) {
glog.V(0).Infof("GarbageCollector is starting running!")
for _, monitor := range gc.monitors {
go monitor.controller.Run(stopCh)
}
Expand Down
197 changes: 0 additions & 197 deletions test/e2e/garbage_collector.go

This file was deleted.

9 changes: 5 additions & 4 deletions test/e2e/generated_clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package e2e

import (
"fmt"
"strconv"
"time"

Expand Down Expand Up @@ -70,7 +71,7 @@ func observePodCreation(w watch.Interface) {
framework.Failf("Failed to observe pod creation: %v", event)
}
case <-time.After(framework.PodStartTimeout):
framework.Failf("Timeout while waiting for pod creation")
Fail("Timeout while waiting for pod creation")
}
}

Expand All @@ -90,7 +91,7 @@ func observeObjectDeletion(w watch.Interface) (obj runtime.Object) {
}
}
if !deleted {
framework.Failf("Failed to observe pod deletion")
Fail("Failed to observe pod deletion")
}
return
}
Expand Down Expand Up @@ -163,7 +164,7 @@ var _ = framework.KubeDescribe("Generated release_1_2 clientset", func() {
options = api.ListOptions{LabelSelector: selector}
pods, err = podClient.List(options)
if err != nil {
framework.Failf("Failed to list pods to verify deletion: %v", err)
Fail(fmt.Sprintf("Failed to list pods to verify deletion: %v", err))
}
Expect(len(pods.Items)).To(Equal(0))
})
Expand Down Expand Up @@ -237,7 +238,7 @@ var _ = framework.KubeDescribe("Generated release_1_3 clientset", func() {
options = api.ListOptions{LabelSelector: selector}
pods, err = podClient.List(options)
if err != nil {
framework.Failf("Failed to list pods to verify deletion: %v", err)
Fail(fmt.Sprintf("Failed to list pods to verify deletion: %v", err))
}
Expect(len(pods.Items)).To(Equal(0))
})
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/pod_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
// This test requires that --terminated-pod-gc-threshold=100 be set on the controller manager
//
// Slow by design (7 min)
var _ = framework.KubeDescribe("Pod garbage collector [Feature:PodGarbageCollector] [Slow]", func() {
f := framework.NewDefaultFramework("pod-garbage-collector")
var _ = framework.KubeDescribe("Garbage collector [Feature:GarbageCollector] [Slow]", func() {
f := framework.NewDefaultFramework("garbage-collector")
It("should handle the creation of 1000 pods", func() {
var count int
for count < 1000 {
Expand Down

0 comments on commit 12483d9

Please sign in to comment.