From 8444b7d1c9a3087feea9ae2012e7c1bc9d6a017b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 18 Sep 2018 12:03:46 -0700 Subject: [PATCH] ci-operator/templates/cluster-launch-installer-e2e*: Destroy with --continue-on-error Taking advantage of openshift/installer@23915f2e (installer/*: Add --continue-on-error to destroy workflow, 2018-09-16, openshift/installer#252) so we can reap at least most of our resources even if the cluster doesn't come up enough for the machine API operator to be able to destroy workers. With various stages of cluster health: 1. Cluster never comes up at all. 2. Cluster healthy enough to create workers. 3. Cluster healthy enough to destroy workers. we're only worried about leakage in the space between 2 and 3. Hopefully there isn't any space there, but without this commit we're currently leaking resources from 1 as well. The two-part destroy attempts are originally from 51df634d (Support an aws installer CI job, 2018-06-07, #928), although there's not much to motivate them there. With --continue-on-error destruction, we're already trying pretty hard to clean everything up. So excepting brief network hiccups and such, I think a single pass is sufficient. And we'll want a better backstop to catch any resources that leak through (e.g. orphaned workers), so I'm dropping the retry here. --- ci-operator/templates/cluster-launch-installer-e2e-smoke.yaml | 4 +--- ci-operator/templates/cluster-launch-installer-e2e.yaml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ci-operator/templates/cluster-launch-installer-e2e-smoke.yaml b/ci-operator/templates/cluster-launch-installer-e2e-smoke.yaml index 4aaace683c3b..bcdf7d8c15fa 100644 --- a/ci-operator/templates/cluster-launch-installer-e2e-smoke.yaml +++ b/ci-operator/templates/cluster-launch-installer-e2e-smoke.yaml @@ -327,9 +327,7 @@ objects: echo "Deprovisioning cluster ..." export AWS_SHARED_CREDENTIALS_FILE=/etc/openshift-installer/.awscred cd /tmp/shared/cluster - for i in `seq 1 2`; do - tectonic destroy --dir=. --log-level=debug - done + tectonic destroy --dir=. --log-level=debug --continue-on-error } trap 'teardown' EXIT diff --git a/ci-operator/templates/cluster-launch-installer-e2e.yaml b/ci-operator/templates/cluster-launch-installer-e2e.yaml index 8f51483d4295..0c5b08c60f1d 100644 --- a/ci-operator/templates/cluster-launch-installer-e2e.yaml +++ b/ci-operator/templates/cluster-launch-installer-e2e.yaml @@ -323,9 +323,7 @@ objects: echo "Deprovisioning cluster ..." export AWS_SHARED_CREDENTIALS_FILE=/etc/openshift-installer/.awscred cd /tmp/shared/cluster - for i in `seq 1 2`; do - tectonic destroy --dir=. --log-level=debug - done + tectonic destroy --dir=. --log-level=debug --continue-on-error } trap 'teardown' EXIT