From 6f86dabd8cc0bed13198942d92fc88b4933f27c1 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" Date: Thu, 29 Sep 2016 13:40:47 -0700 Subject: [PATCH] [Federation] Sleep for 2m (arbitrarily chosen) to let the underlying clusters to clean up all the resources they are holding. --- hack/e2e-internal/e2e-down.sh | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/hack/e2e-internal/e2e-down.sh b/hack/e2e-internal/e2e-down.sh index 41108a59c4f..87251daf1dc 100755 --- a/hack/e2e-internal/e2e-down.sh +++ b/hack/e2e-internal/e2e-down.sh @@ -30,15 +30,25 @@ source "${KUBE_ROOT}/cluster/kube-util.sh" prepare-e2e if [[ "${FEDERATION:-}" == "true" ]];then - source "${KUBE_ROOT}/federation/cluster/common.sh" - for zone in ${E2E_ZONES};do - # bring up e2e cluster - ( - set-federation-zone-vars "$zone" - cleanup-federation-api-objects || echo "Couldn't cleanup federation api objects" - test-teardown - ) - done + source "${KUBE_ROOT}/federation/cluster/common.sh" + for zone in ${E2E_ZONES};do + # bring down an e2e cluster + ( + set-federation-zone-vars "$zone" + cleanup-federation-api-objects || echo "Couldn't cleanup federation api objects" + + # TODO(madhusudancs): This is an arbitrary amount of sleep to give Kubernetes + # clusters enough time to delete the underlying cloud provider resources + # corresponding to the Kubernetes resources we deleted as part of the test + # teardowns. It is shameful that we are doing this, but this is just a bandage + # to stop the bleeding. Please don't use this pattern anywhere. Remove this + # when proper cloud provider cleanups are implemented in the individual test + # `AfterEach` blocks. + sleep 2m + + test-teardown + ) +done else - test-teardown + test-teardown fi