Improve waiting in build-and-deploy

This commit is contained in:
Joshua Boniface 2023-10-23 22:23:48 -04:00
parent 8d256a1737
commit c858ae8fed
1 changed files with 16 additions and 13 deletions

View File

@ -61,8 +61,11 @@ for HOST in ${HOSTS[@]}; do
ssh $HOST $SUDO systemctl restart pvcapid-worker &>/dev/null ssh $HOST $SUDO systemctl restart pvcapid-worker &>/dev/null
ssh $HOST $SUDO systemctl restart pvcnoded &>/dev/null ssh $HOST $SUDO systemctl restart pvcnoded &>/dev/null
echo " done." echo " done."
echo -n "Waiting 30s for host to stabilize... " echo -n "Waiting for node daemon to be running..."
sleep 30 while [[ $( ssh $HOST "pvc -q node list -f json ${HOST%%.*} | jq -r '.[].daemon_state'" ) != "run" ]]; do
sleep 5
echo -n "."
done
echo " done." echo " done."
done done
if [[ -z ${KEEP_ARTIFACTS} ]]; then if [[ -z ${KEEP_ARTIFACTS} ]]; then