ci: add more logging during Rook deployment

It seems that the new log_errors() function does not get triggered when
the script hits `exit 1` conditions in functions. The functions should
return a non-0 value, not cause an exit of the script.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-11-24 17:08:32 +01:00 committed by mergify[bot]
parent ed033153ea
commit 954ac97d22

View File

@ -59,6 +59,12 @@ kubectl_retry() {
ret=1 ret=1
break break
fi fi
# log stderr and empty the tmpfile
cat "${stderr}" > /dev/stderr
true > "${stderr}"
echo "kubectl_retry ${*} failed, will retry in ${KUBECTL_RETRY_DELAY} seconds"
sleep ${KUBECTL_RETRY_DELAY} sleep ${KUBECTL_RETRY_DELAY}
done done
@ -160,7 +166,7 @@ function check_ceph_cluster_health() {
if [ "$retry" -gt "$ROOK_DEPLOY_TIMEOUT" ]; then if [ "$retry" -gt "$ROOK_DEPLOY_TIMEOUT" ]; then
echo "[Timeout] CEPH cluster not in a healthy state (timeout)" echo "[Timeout] CEPH cluster not in a healthy state (timeout)"
exit 1 return 1
fi fi
echo "" echo ""
} }
@ -186,7 +192,7 @@ function check_mds_stat() {
if [ "$retry" -gt "$ROOK_DEPLOY_TIMEOUT" ]; then if [ "$retry" -gt "$ROOK_DEPLOY_TIMEOUT" ]; then
echo "[Timeout] Failed to get ceph filesystem pods" echo "[Timeout] Failed to get ceph filesystem pods"
exit 1 return 1
fi fi
echo "" echo ""
} }
@ -213,7 +219,7 @@ function check_rbd_stat() {
if [ "$retry" -gt "$ROOK_DEPLOY_TIMEOUT" ]; then if [ "$retry" -gt "$ROOK_DEPLOY_TIMEOUT" ]; then
echo "[Timeout] Failed to get RBD pool stats" echo "[Timeout] Failed to get RBD pool stats"
exit 1 return 1
fi fi
echo "" echo ""
} }