mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
fix(script): handle wait_for_success failed condition
In the wait_node_ready function, two steps are performed: 1.Check if the node exists 2.Wait for the node to enter the ready state If one step fails, the second step should not continue, wasting 300 seconds.
This commit is contained in:
parent
2e93c65eff
commit
687ca0e0bb
@ -685,6 +685,10 @@ function wait_node_ready(){
|
||||
local system_node_wait_time=60
|
||||
local interval_time=2
|
||||
kube::util::wait_for_success "$system_node_wait_time" "$interval_time" "$nodes_stats | grep $node_name"
|
||||
if [ $? == "1" ]; then
|
||||
echo "time out on waiting $node_name exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local system_node_ready_time=300
|
||||
local node_ready="${KUBECTL} --kubeconfig '${CERT_DIR}/admin.kubeconfig' wait --for=condition=Ready --timeout=60s nodes $node_name"
|
||||
|
Loading…
Reference in New Issue
Block a user