Use gcloud_DeleteInstances

This commit is contained in:
Michael Vines
2018-08-28 07:53:42 -07:00
parent d26f135159
commit 9d53208d68
2 changed files with 10 additions and 4 deletions

View File

@@ -184,7 +184,7 @@ findVms() {
declare class="$1"
declare filter="$2"
gcloud_FindInstances "$filter"
gcloud_FindInstances "$filter" show
vmlist+=("${instances[@]/#/$class:}")
}
@@ -216,7 +216,7 @@ delete_unreachable_validators() {
# Validators are managed by a Compute Engine Instance Group, so deleting
# one will just cause a new one to be spawned.
echo "Warning: $vmName is unreachable, deleting it"
gcloud compute instances delete "$vmName" --zone "$vmZone"
gcloud_DeleteInstances "$vmName"
fi
echo "validator checked in ${SECONDS} seconds"
) >> "log-$vmName.txt" 2>&1 &