From 8c19ee4e02908c73c261dd804e8347064932e81c Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Thu, 29 Aug 2019 16:05:50 -0400 Subject: [PATCH] Update CI to wait for a worker to come up. This was previously disabled while we got some issues fixed up with the baremetal-operator deployment. This should now be working. Part of #739 --- run_ci.sh | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/run_ci.sh b/run_ci.sh index 338724b20..484fd0876 100755 --- a/run_ci.sh +++ b/run_ci.sh @@ -142,27 +142,20 @@ done # Run dev-scripts set -o pipefail -# TODO - Run all steps again once the baremetal-operator pod is fixed -#timeout -s 9 85m make |& ts "%b %d %H:%M:%S | " |& sed -e 's/.*auths.*/*** PULL_SECRET ***/g' -timeout -s 9 85m make requirements configure ironic ocp_run register_hosts |& ts "%b %d %H:%M:%S | " |& sed -e 's/.*auths.*/*** PULL_SECRET ***/g' +timeout -s 9 85m make |& ts "%b %d %H:%M:%S | " |& sed -e 's/.*auths.*/*** PULL_SECRET ***/g' # Deployment is complete, but now wait to ensure the worker node comes up. export KUBECONFIG=ocp/auth/kubeconfig -# TODO - -# We do not expect a worker to come up right now, as the machine-api-operator -# managed metal3 deployment is known to be failing. We also do the deployment -# only configured with 3 masters and 0 workers. We'll need to update this to -# scale the worker machine set up to 1 here. -#wait_for_worker() { -# worker=$1 -# echo "Waiting for worker $worker to appear ..." -# while [ "$(oc get nodes | grep $worker)" = "" ]; do sleep 5; done -# TIMEOUT_MINUTES=15 -# echo "$worker registered, waiting $TIMEOUT_MINUTES minutes for Ready condition ..." -# oc wait node/$worker --for=condition=Ready --timeout=$[${TIMEOUT_MINUTES} * 60]s -#} -#wait_for_worker worker-0 +wait_for_worker() { + worker=$1 + echo "Waiting for worker $worker to appear ..." + while [ "$(oc get nodes | grep $worker)" = "" ]; do sleep 5; done + TIMEOUT_MINUTES=15 + echo "$worker registered, waiting $TIMEOUT_MINUTES minutes for Ready condition ..." + oc wait node/$worker --for=condition=Ready --timeout=$[${TIMEOUT_MINUTES} * 60]s +} +wait_for_worker worker-0 # Populate cache for files it doesn't have, or that have changed for FILE in $FILESTOCACHE ; do