rework node ready wait status

This commit is contained in:
Robert O'Brien
2022-05-04 21:15:27 +02:00
committed by Sanja
parent 1dd3b836ee
commit 849ea7851b
+6 -1
View File
@@ -32,7 +32,12 @@ def get_node(node_name, label_selector, instance_kill_count):
# Wait till node status becomes Ready
def wait_for_ready_status(node, timeout):
runcommand.invoke("kubectl wait --for=condition=Ready " "node/" + node + " --timeout=" + str(timeout) + "s")
for _ in range(timeout):
if kubecli.get_node_status(node) == "Ready":
break
time.sleep(3)
if kubecli.get_node_status(node) != "Ready":
raise Exception("Node condition status isn't Ready")
# Wait till node status becomes NotReady