mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Merge pull request #4317 from justinsb/retry_logic_on_update
Fix polling in e2e-suite/update.sh: exit if we time out
This commit is contained in:
commit
e14ebcbea8
@ -42,9 +42,14 @@ function validate() {
|
|||||||
# Container turn up on a clean cluster can take a while for the docker image pull.
|
# Container turn up on a clean cluster can take a while for the docker image pull.
|
||||||
local num_running=0
|
local num_running=0
|
||||||
local i=0
|
local i=0
|
||||||
while [[ ${num_running} -ne ${num_replicas} && ${i} -ne 100 ]]; do
|
while [[ ${num_running} -ne ${num_replicas} ]]; do
|
||||||
((i++)) || true
|
((i++)) || true
|
||||||
echo "Waiting for all containers in pod to come up. Currently: ${num_running}/${num_replicas}"
|
if [[ ${i} -eq 20 ]]; then
|
||||||
|
echo "Timed out waiting for all containers in pod to come up. (Reached ${num_running}/${num_replicas})"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Waiting for all containers in pod to come up. Currently: ${num_running}/${num_replicas} @ attempt ${i}"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
local pod_id_list
|
local pod_id_list
|
||||||
|
Loading…
Reference in New Issue
Block a user