Exit faster on sanity failures

This commit is contained in:
Michael Vines 2019-04-09 17:16:10 -07:00
parent 0b95a5c121
commit 88e5b14afc
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
1 changed files with 12 additions and 10 deletions

View File

@ -255,32 +255,34 @@ startClient() {
} }
sanity() { sanity() {
declare ok=true
echo "--- Sanity"
$metricsWriteDatapoint "testnet-deploy net-sanity-begin=1" $metricsWriteDatapoint "testnet-deploy net-sanity-begin=1"
declare ok=true
declare bootstrapLeader=${fullnodeIpList[0]} declare bootstrapLeader=${fullnodeIpList[0]}
declare blockstreamer=${blockstreamerIpList[0]} declare blockstreamer=${blockstreamerIpList[0]}
echo "--- Sanity: $bootstrapLeader"
( (
set -x set -x
echo "--- Sanity: $bootstrapLeader"
# shellcheck disable=SC2029 # remote-client.sh args are expanded on client side intentionally # shellcheck disable=SC2029 # remote-client.sh args are expanded on client side intentionally
ssh "${sshOptions[@]}" "$bootstrapLeader" \ ssh "${sshOptions[@]}" "$bootstrapLeader" \
"./solana/net/remote/remote-sanity.sh $sanityExtraArgs \"$RUST_LOG\"" "./solana/net/remote/remote-sanity.sh $sanityExtraArgs \"$RUST_LOG\""
) || ok=false
$ok || exit 1
if [[ -n $blockstreamer ]]; then
# If there's a blockstreamer node run a reduced sanity check on it as well # If there's a blockstreamer node run a reduced sanity check on it as well
if [[ -n $blockstreamer ]]; then echo "--- Sanity: $blockstreamer"
echo "--- Sanity: $blockstreamer" (
set -x
# shellcheck disable=SC2029 # remote-client.sh args are expanded on client side intentionally # shellcheck disable=SC2029 # remote-client.sh args are expanded on client side intentionally
ssh "${sshOptions[@]}" "$blockstreamer" \ ssh "${sshOptions[@]}" "$blockstreamer" \
"./solana/net/remote/remote-sanity.sh $sanityExtraArgs -o noLedgerVerify -o noValidatorSanity \"$RUST_LOG\"" "./solana/net/remote/remote-sanity.sh $sanityExtraArgs -o noLedgerVerify -o noValidatorSanity \"$RUST_LOG\""
) || ok=false
fi $ok || exit 1
) || ok=false fi
$metricsWriteDatapoint "testnet-deploy net-sanity-complete=1" $metricsWriteDatapoint "testnet-deploy net-sanity-complete=1"
$ok || exit 1
} }
start() { start() {