Unfold log on errors

This commit is contained in:
Michael Vines 2019-01-23 07:47:18 -08:00
parent fbeba259b3
commit 73930b5eac
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
1 changed files with 5 additions and 1 deletions

View File

@ -128,6 +128,7 @@ waitForAllNodesToInit() {
for initCompleteFile in "${initCompleteFiles[@]}"; do for initCompleteFile in "${initCompleteFiles[@]}"; do
while [[ ! -r $initCompleteFile ]]; do while [[ ! -r $initCompleteFile ]]; do
if [[ $SECONDS -ge 30 ]]; then if [[ $SECONDS -ge 30 ]]; then
echo "^^^ +++"
echo "Error: $initCompleteFile not found in $SECONDS seconds" echo "Error: $initCompleteFile not found in $SECONDS seconds"
exit 1 exit 1
fi fi
@ -169,7 +170,8 @@ killNode() {
if kill "$pid"; then if kill "$pid"; then
wait "$pid" wait "$pid"
else else
echo -e "^^^ +++\\nWarning: unable to kill $pid" echo "^^^ +++"
echo "Warning: unable to kill $pid"
fi fi
set -e set -e
} }
@ -184,10 +186,12 @@ killNodes() {
rollingNodeRestart() { rollingNodeRestart() {
if [[ ${#logs[@]} -ne ${#nodes[@]} ]]; then if [[ ${#logs[@]} -ne ${#nodes[@]} ]]; then
echo "^^^ +++"
echo "Error: log/nodes array length mismatch" echo "Error: log/nodes array length mismatch"
exit 1 exit 1
fi fi
if [[ ${#pids[@]} -ne ${#nodes[@]} ]]; then if [[ ${#pids[@]} -ne ${#nodes[@]} ]]; then
echo "^^^ +++"
echo "Error: pids/nodes array length mismatch" echo "Error: pids/nodes array length mismatch"
exit 1 exit 1
fi fi