summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClayton Coleman <ccoleman@redhat.com>2017-10-31 19:07:57 -0400
committerGitHub <noreply@github.com>2017-10-31 19:07:57 -0400
commit4572e05b17eed19851861e52507567a86d0b3432 (patch)
treed71186a52b0f8042b57755d969fd8cda3caf42c6
parentb393201a048ca7b73b1892d8222390954dca4841 (diff)
parent34dcc2d0b68d9bd549183a81b531e278bd448589 (diff)
downloadopenshift-4572e05b17eed19851861e52507567a86d0b3432.tar.gz
openshift-4572e05b17eed19851861e52507567a86d0b3432.tar.bz2
openshift-4572e05b17eed19851861e52507567a86d0b3432.tar.xz
openshift-4572e05b17eed19851861e52507567a86d0b3432.zip
Merge pull request #5956 from smarterclayton/delete_build_istance
Ensure GCP image build instance gets cleaned up on teardown
-rw-r--r--roles/openshift_gcp/templates/remove.j2.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/openshift_gcp/templates/remove.j2.sh b/roles/openshift_gcp/templates/remove.j2.sh
index 10b463349..c9213b800 100644
--- a/roles/openshift_gcp/templates/remove.j2.sh
+++ b/roles/openshift_gcp/templates/remove.j2.sh
@@ -68,6 +68,12 @@ fi
done
) &
+# Instances and disks used for image building
+(
+ teardown "{{ openshift_gcp_prefix }}build-image-instance" compute instances --zone "{{ openshift_gcp_zone }}"
+ teardown "{{ openshift_gcp_prefix }}build-image-instance" compute disks --zone "{{ openshift_gcp_zone }}"
+) &
+
# DNS
(
dns_zone="{{ dns_managed_zone | default(openshift_gcp_prefix + 'managed-zone') }}"