NO-ISSUE: more indicative message when agents not coming back
@@ -102,11 +102,13 @@ function get_agents_with_role() {
export role=master
export -f wait_for_cmd_amount
export -f get_agents_with_role
-timeout 20m bash -c "wait_for_cmd_amount ${SPOKE_CONTROLPLANE_AGENTS} 30 get_agents_with_role"
+timeout --signal=SIGKILL 20m bash -c "wait_for_cmd_amount ${SPOKE_CONTROLPLANE_AGENTS} 30 get_agents_with_role" || \
+ (echo "Timed-out waiting for agents to be ready" && exit 124)
+
echo "All ${SPOKE_CONTROLPLANE_AGENTS} agents have been discovered!"
if [[ "${ASSISTED_STOP_AFTER_AGENT_DISCOVERY}" == "true" ]]; then
- echo "Agents have been discovered, do not wait for the cluster installtion to finish."
+ echo "Agents have been discovered, do not wait for the cluster installation to finish."
exit
fi
