Use the parameter --wait to check if pods started

There was this parameter --wait to check if the pods are running
before proceed and we are implementing the use of it on this
commit.

Test plan:
     Run the pipeline.

Change-Id: I5207d41b0c66d63269673f9f2762a351aa382353
Signed-off-by: Rafael Santos <rafael.lopesdossantos@windriver.com>
This commit is contained in:
Rafael Santos 2024-09-09 11:07:04 -03:00 committed by rlopesdo
parent 0561964995
commit 3d67d9f5eb

View File

@ -16,17 +16,9 @@ require_job_env BUILDER_POD_STARTUP_TIMEOUT
set -x
stx control stop
stx config --upgrade
stx control start
### There is a timeout of 5 minutes on the --wait parameter
stx control start --wait
# wait for startup
notice "waiting for containers to startup ($BUILDER_POD_STARTUP_TIMEOUT seconds)"
let deadline="$(date '+%s')+$BUILDER_POD_STARTUP_TIMEOUT"
until check_all_pods_running ; do
if [[ "$(date '+%s')" -ge $deadline ]] ; then
die "pods didn't start up after $BUILDER_POD_STARTUP_TIMEOUT second(s)"
fi
sleep 10
done
stx control status
# Add ssh access key to signing server