mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #8208 from saad-ali/fixTemplateUpDown2
Fix GCE kube-down incorrect MIG delete OpID
This commit is contained in:
commit
a61baf6a74
@ -653,14 +653,14 @@ function kube-down {
|
||||
"${NODE_INSTANCE_PREFIX}-group")
|
||||
if [[ "$deleteCmdOutput" != "" ]]; then
|
||||
# Managed instance group deletion is done asyncronously, we must wait for it to complete, or subsequent steps fail
|
||||
deleteCmdOperationId=$(echo $deleteCmdOutput | grep "Operation:" | sed "s/.*Operation:\s//" | sed "s/\s.*//" | sed "s/ //g")
|
||||
deleteCmdOperationId=$(echo $deleteCmdOutput | grep "Operation:" | sed "s/.*Operation:[[:space:]]*\([^[:space:]]*\).*/\1/g")
|
||||
if [[ "$deleteCmdOperationId" != "" ]]; then
|
||||
deleteCmdStatus="PENDING"
|
||||
while [[ "$deleteCmdStatus" != "DONE" ]]
|
||||
do
|
||||
sleep 5
|
||||
sleep 5
|
||||
deleteCmdOperationOutput=$(gcloud preview managed-instance-groups --zone "${ZONE}" get-operation $deleteCmdOperationId)
|
||||
deleteCmdStatus=$(echo $deleteCmdOperationOutput | grep -i "status:" | sed "s/.*status:\s//" | sed "s/\s.*//" | sed "s/ //g")
|
||||
deleteCmdStatus=$(echo $deleteCmdOperationOutput | grep -i "status:" | sed "s/.*status:[[:space:]]*\([^[:space:]]*\).*/\1/g")
|
||||
echo "Waiting for MIG deletion to complete. Current status: " $deleteCmdStatus
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user