mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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")
|
"${NODE_INSTANCE_PREFIX}-group")
|
||||||
if [[ "$deleteCmdOutput" != "" ]]; then
|
if [[ "$deleteCmdOutput" != "" ]]; then
|
||||||
# Managed instance group deletion is done asyncronously, we must wait for it to complete, or subsequent steps fail
|
# 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
|
if [[ "$deleteCmdOperationId" != "" ]]; then
|
||||||
deleteCmdStatus="PENDING"
|
deleteCmdStatus="PENDING"
|
||||||
while [[ "$deleteCmdStatus" != "DONE" ]]
|
while [[ "$deleteCmdStatus" != "DONE" ]]
|
||||||
do
|
do
|
||||||
sleep 5
|
sleep 5
|
||||||
deleteCmdOperationOutput=$(gcloud preview managed-instance-groups --zone "${ZONE}" get-operation $deleteCmdOperationId)
|
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
|
echo "Waiting for MIG deletion to complete. Current status: " $deleteCmdStatus
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user