Skip to content

Commit b5efa6a

Browse files
authored
AGENT-174: Use wait-for commands to wait for bootstrap (#1430)
* AGENT-265: Use --dir option to openshift-install * AGENT-174: Use wait-for commands to wait for bootstrap Use the new wait-for bootstrap-complete command to determine when the bootstrap is complete. This should give us more debug information than we have had hitherto.
1 parent c909891 commit b5efa6a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

agent/05_agent_create_cluster.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ function wait_for_cluster_ready() {
6767
node0_ip=$(sudo virsh net-dumpxml ostestbm | xmllint --xpath "string(//dns[*]/host/hostname[. = '${node0_name}']/../@ip)" -)
6868
ssh_opts=(-o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -q core@${node0_ip})
6969

70-
until ssh "${ssh_opts[@]}" "[[ -f /var/lib/kubelet/kubeconfig ]]"
71-
do
72-
echo "Waiting for bootstrap... "
73-
sleep 1m;
74-
done
75-
76-
sleep 5m
70+
local openshift_install="$(realpath "${OCP_DIR}/openshift-install")"
71+
if ! "${openshift_install}" --dir="${OCP_DIR}" --log-level=debug agent wait-for bootstrap-complete; then
72+
exit 1
73+
fi
7774

7875
echo "Waiting for cluster ready... "
7976
if oc wait --for=condition=Ready nodes --all --timeout=60m --kubeconfig=${OCP_DIR}/auth/kubeconfig; then

0 commit comments

Comments
 (0)