Skip to content

Commit

Permalink
Fail early for SGE rather than waiting the CI max time (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesteve committed Mar 22, 2021
1 parent e7fcb31 commit c282545
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ci/sge/start-sge.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#!/bin/bash

docker-compose up -d --no-build

START=$(date +%s)
MAX_WAIT_SECONDS=300

while [ `docker exec sge_master qhost | grep lx26-amd64 | wc -l` -ne 2 ]
do
do
if [[ $(($(date +%s) - $START)) -gt $MAX_WAIT_SECONDS ]]; then
echo "Exiting after failing to start the cluster in $MAX_WAIT_SECONDS seconds"
exit 1
fi
echo "Waiting for SGE slots to become available";
sleep 1
done
done

echo "SGE properly configured"

0 comments on commit c282545

Please sign in to comment.