Don't fail teardown if we can't delete the network

pull/6/head
Jeff Grafton 2016-10-13 12:24:22 -07:00
parent a474b2b9a0
commit 6b65d4a390
2 changed files with 1 additions and 2 deletions

View File

@ -1362,7 +1362,7 @@ function kube-down() {
"${NETWORK}-default-ssh" \
"${NETWORK}-default-internal" # Pre-1.5 clusters
if [[ "${KUBE_DELETE_NETWORK}" == "true" ]]; then
delete-network
delete-network || true # might fail if there are leaked firewall rules
fi
# If there are no more remaining master replicas, we should update kubeconfig.

View File

@ -387,7 +387,6 @@ function test-teardown() {
if ! "${GCLOUD}" compute networks delete --project "${PROJECT}" --quiet "${NETWORK}"; then
echo "Failed to delete network '${NETWORK}'. Listing firewall-rules:"
"${GCLOUD}" compute firewall-rules --project "${PROJECT}" list --filter="network=${NETWORK}"
return 1
fi
fi
fi