Commit 529818c9 authored by Jerzy Szczepkowski's avatar Jerzy Szczepkowski

Fixed #32366: wrong master pd name during kube-down.

Fixed #32366: wrong master pd name during kube-down.
parent 8f4c0bbc
......@@ -1183,12 +1183,14 @@ function kube-down() {
fi
# Delete the master replica pd (possibly leaked by kube-up if master create failed).
if gcloud compute disks describe "${REPLICA_NAME}"-pd --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then
# TODO(jszczepkowski): remove also possibly leaked replicas' pds
local -r replica-pd="${REPLICA_NAME:-${MASTER_NAME}}-pd"
if gcloud compute disks describe "${replica-pd}" --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then
gcloud compute disks delete \
--project "${PROJECT}" \
--quiet \
--zone "${ZONE}" \
"${REPLICA_NAME}"-pd
"${replica-pd}"
fi
# Delete disk for cluster registry if enabled
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment