Sanity check that runs on the blockstreamer node now checks that node instead of the bootstrap leader (#4551)

automerge
This commit is contained in:
Michael Vines 2019-06-04 22:46:48 -07:00 committed by Grimes
parent 51aacfe3ca
commit 5c98c1d306
2 changed files with 17 additions and 14 deletions

View File

@ -392,7 +392,7 @@ sanity() {
set -x 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[@]}" "$bootstrapLeader" \ ssh "${sshOptions[@]}" "$bootstrapLeader" \
"./solana/net/remote/remote-sanity.sh $sanityExtraArgs \"$RUST_LOG\"" "./solana/net/remote/remote-sanity.sh $bootstrapLeader $sanityExtraArgs \"$RUST_LOG\""
) || ok=false ) || ok=false
$ok || exit 1 $ok || exit 1
@ -403,7 +403,7 @@ sanity() {
set -x 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 $blockstreamer $sanityExtraArgs -o noLedgerVerify -o noValidatorSanity \"$RUST_LOG\""
) || ok=false ) || ok=false
$ok || exit 1 $ok || exit 1
fi fi

View File

@ -6,6 +6,8 @@ set -e
cd "$(dirname "$0")"/../.. cd "$(dirname "$0")"/../..
sanityTargetIp="$1"
deployMethod= deployMethod=
entrypointIp= entrypointIp=
numNodes= numNodes=
@ -23,6 +25,7 @@ missing() {
exit 1 exit 1
} }
[[ -n $sanityTargetIp ]] || missing sanityTargetIp
[[ -n $deployMethod ]] || missing deployMethod [[ -n $deployMethod ]] || missing deployMethod
[[ -n $entrypointIp ]] || missing entrypointIp [[ -n $entrypointIp ]] || missing entrypointIp
[[ -n $numNodes ]] || missing numNodes [[ -n $numNodes ]] || missing numNodes
@ -66,7 +69,7 @@ local|tar)
source target/perf-libs/env.sh source target/perf-libs/env.sh
fi fi
entrypointRsyncUrl="$entrypointIp:~/solana" entrypointRsyncUrl="$sanityTargetIp:~/solana"
solana_gossip=solana-gossip solana_gossip=solana-gossip
solana_install=solana-install solana_install=solana-install
@ -91,7 +94,7 @@ else
fi fi
fi fi
echo "+++ $entrypointIp: node count ($numSanityNodes expected)" echo "+++ $sanityTargetIp: node count ($numSanityNodes expected)"
( (
set -x set -x
$solana_keygen -o "$client_id" $solana_keygen -o "$client_id"
@ -101,26 +104,26 @@ echo "+++ $entrypointIp: node count ($numSanityNodes expected)"
nodeArg="num-nodes-exactly" nodeArg="num-nodes-exactly"
fi fi
timeout 2m $solana_gossip --entrypoint "$entrypointIp:8001" \ timeout 2m $solana_gossip --entrypoint "$sanityTargetIp:8001" \
spy --$nodeArg "$numSanityNodes" \ spy --$nodeArg "$numSanityNodes" \
) )
echo "--- RPC API: getTransactionCount" echo "--- $sanityTargetIp: RPC API: getTransactionCount"
( (
set -x set -x
curl --retry 5 --retry-delay 2 --retry-connrefused \ curl --retry 5 --retry-delay 2 --retry-connrefused \
-X POST -H 'Content-Type: application/json' \ -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' \ -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' \
http://"$entrypointIp":8899 http://"$sanityTargetIp":8899
) )
echo "--- $entrypointIp: wallet sanity" echo "--- $sanityTargetIp: wallet sanity"
( (
set -x set -x
scripts/wallet-sanity.sh --url http://"$entrypointIp":8899 scripts/wallet-sanity.sh --url http://"$sanityTargetIp":8899
) )
echo "--- $entrypointIp: verify ledger" echo "--- $sanityTargetIp: verify ledger"
if $ledgerVerify; then if $ledgerVerify; then
if [[ -d $ledger ]]; then if [[ -d $ledger ]]; then
( (
@ -140,13 +143,13 @@ else
fi fi
echo "--- $entrypointIp: validator sanity" echo "--- $sanityTargetIp: validator sanity"
if $validatorSanity; then if $validatorSanity; then
( (
set -x -o pipefail set -x -o pipefail
timeout 10s ./multinode-demo/validator-x.sh --stake 0 \ timeout 10s ./multinode-demo/validator-x.sh --stake 0 \
"$entrypointRsyncUrl" \ "$entrypointRsyncUrl" \
"$entrypointIp:8001" 2>&1 | tee validator-sanity.log "$sanityTargetIp:8001" 2>&1 | tee validator-sanity.log
) || { ) || {
exitcode=$? exitcode=$?
[[ $exitcode -eq 124 ]] || exit $exitcode [[ $exitcode -eq 124 ]] || exit $exitcode
@ -165,7 +168,7 @@ else
fi fi
if [[ -r update_manifest_keypair.json ]]; then if [[ -r update_manifest_keypair.json ]]; then
echo "--- $entrypointIp: solana-install test" echo "--- $sanityTargetIp: solana-install test"
( (
set -x set -x
@ -174,7 +177,7 @@ if [[ -r update_manifest_keypair.json ]]; then
$solana_install init \ $solana_install init \
--no-modify-path \ --no-modify-path \
--data-dir install-data-dir \ --data-dir install-data-dir \
--url http://"$entrypointIp":8899 \ --url http://"$sanityTargetIp":8899 \
--pubkey "$update_manifest_pubkey" --pubkey "$update_manifest_pubkey"
$solana_install info $solana_install info