2018-07-16 12:05:48 -07:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
2018-09-06 10:34:24 -07:00
|
|
|
usage() {
|
|
|
|
exitcode=0
|
|
|
|
if [[ -n "$1" ]]; then
|
|
|
|
exitcode=1
|
|
|
|
echo "Error: $*"
|
2018-08-17 20:41:30 -07:00
|
|
|
fi
|
2018-09-06 10:34:24 -07:00
|
|
|
cat <<EOF
|
2018-09-28 07:32:49 -07:00
|
|
|
usage: $0 [name] [zone]
|
2018-07-20 08:50:08 -07:00
|
|
|
|
2018-09-06 10:34:24 -07:00
|
|
|
Sanity check a CD testnet
|
2018-07-16 12:05:48 -07:00
|
|
|
|
2018-09-06 10:34:24 -07:00
|
|
|
name - name of the network
|
2018-09-28 07:32:49 -07:00
|
|
|
zone - zone of the network
|
2018-07-19 11:56:40 -07:00
|
|
|
|
2018-09-06 10:34:24 -07:00
|
|
|
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
|
|
|
|
metrics
|
|
|
|
EOF
|
|
|
|
exit $exitcode
|
|
|
|
}
|
2018-08-13 12:13:00 -07:00
|
|
|
|
2018-09-06 10:34:24 -07:00
|
|
|
netName=$1
|
2018-09-28 07:32:49 -07:00
|
|
|
zone=$2
|
2018-09-06 10:34:24 -07:00
|
|
|
[[ -n $netName ]] || usage ""
|
2018-09-28 07:32:49 -07:00
|
|
|
[[ -n $zone ]] || usage "Zone not specified"
|
2018-09-06 10:34:24 -07:00
|
|
|
|
|
|
|
set -x
|
2018-09-07 12:36:19 -07:00
|
|
|
echo --- gce.sh config
|
2018-09-28 07:32:49 -07:00
|
|
|
net/gce.sh config -p "$netName" -z "$zone"
|
2018-09-06 10:34:24 -07:00
|
|
|
net/init-metrics.sh -e
|
2018-09-07 12:36:19 -07:00
|
|
|
echo --- net.sh sanity
|
2018-09-07 22:37:00 -07:00
|
|
|
net/net.sh sanity \
|
|
|
|
${NO_LEDGER_VERIFY:+-o noLedgerVerify} \
|
|
|
|
${NO_VALIDATOR_SANITY:+-o noValidatorSanity} \
|
2018-09-11 20:00:49 -07:00
|
|
|
${REJECT_EXTRA_NODES:+-o rejectExtraNodes} \
|
2018-08-09 18:35:43 -07:00
|
|
|
|
2018-07-16 12:05:48 -07:00
|
|
|
exit 0
|