testnet-beta sanity no longer tries to check inactive zones

This commit is contained in:
Michael Vines 2019-04-17 09:09:38 -07:00
parent aa6c82cfdc
commit eb185b9ea5
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
2 changed files with 52 additions and 48 deletions

View File

@ -72,6 +72,9 @@ export SOLANA_METRICS_CONFIG="db=$TESTNET,$SOLANA_METRICS_PARTIAL_CONFIG"
echo "SOLANA_METRICS_CONFIG: $SOLANA_METRICS_CONFIG"
source scripts/configure-metrics.sh
EC2_ZONES=(us-west-1a sa-east-1a ap-northeast-2a eu-central-1a ca-central-1a)
GCE_ZONES=(us-west1-b asia-east2-a europe-west4-a southamerica-east1-b us-east4-c)
ci/channel-info.sh
eval "$(ci/channel-info.sh)"
@ -139,22 +142,19 @@ sanity() {
testnet-beta)
(
set -x
EC2_ZONES=(us-west-1a sa-east-1a ap-northeast-2a eu-central-1a ca-central-1a)
ok=true
for zone in "${EC2_ZONES[@]}"; do
if ! $ok; then
break
fi
ci/testnet-sanity.sh beta-testnet-solana-com ec2 "$zone" || ok=false
done
GCE_ZONES=(us-west1-b asia-east2-a europe-west4-a southamerica-east1-b us-east4-c)
for zone in "${GCE_ZONES[@]}"; do
if ! $ok; then
break
ok=true
if [[ -n $EC2_NODE_COUNT ]]; then
ci/testnet-sanity.sh beta-testnet-solana-com ec2 "${EC2_ZONES[0]}" || ok=false
fi
if $ok && [[ -n $GCE_NODE_COUNT ]]; then
if [[ -n $EC2_NODE_COUNT ]]; then
echo "TODO: Fix testnet-sanity.sh to work with a multinode testnet. It needs an '-x'-like argument"
exit 1
fi
ci/testnet-sanity.sh beta-testnet-solana-com gce "$zone" || ok=false
done
ci/testnet-sanity.sh beta-testnet-solana-com gce "${GCE_ZONES[0]}" || ok=false
fi
$ok
)
;;
@ -227,8 +227,6 @@ start() {
testnet-beta)
(
set -x
EC2_ZONES=(us-west-1a sa-east-1a ap-northeast-2a eu-central-1a ca-central-1a)
GCE_ZONES=(us-west1-b asia-east2-a europe-west4-a southamerica-east1-b us-east4-c)
# Build an array to pass as opts to testnet-deploy.sh: "-z zone1 -z zone2 ..."
GCE_ZONE_ARGS=()
@ -241,19 +239,23 @@ start() {
EC2_ZONE_ARGS+=("-z $val")
done
# shellcheck disable=SC2068
[[ -z $EC2_NODE_COUNT ]] || ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 ${EC2_ZONE_ARGS[@]} \
-t "$CHANNEL_OR_TAG" -n "$EC2_NODE_COUNT" -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \
${maybeReuseLedger:+-r} \
${maybeDelete:+-D} \
${GCE_NODE_COUNT:+-s}
if [[ -n $EC2_NODE_COUNT ]]; then
# shellcheck disable=SC2068
ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 ${EC2_ZONE_ARGS[@]} \
-t "$CHANNEL_OR_TAG" -n "$EC2_NODE_COUNT" -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \
${maybeReuseLedger:+-r} \
${maybeDelete:+-D} \
${GCE_NODE_COUNT:+-s}
fi
# shellcheck disable=SC2068
[[ -z $GCE_NODE_COUNT ]] || ci/testnet-deploy.sh -p beta-testnet-solana-com -C gce ${GCE_ZONE_ARGS[@]} \
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P \
${maybeReuseLedger:+-r} \
${maybeDelete:+-D} \
${EC2_NODE_COUNT:+-x}
if [[ -n $GCE_NODE_COUNT ]]; then
# shellcheck disable=SC2068
ci/testnet-deploy.sh -p beta-testnet-solana-com -C gce ${GCE_ZONE_ARGS[@]} \
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P \
${maybeReuseLedger:+-r} \
${maybeDelete:+-D} \
${EC2_NODE_COUNT:+-x}
fi
)
;;
testnet-beta-perf)

View File

@ -11,13 +11,13 @@ usage() {
echo "Error: $*"
fi
cat <<EOF
usage: $0 [name] [cloud] [zone]
usage: $0 [name] [cloud] [zone1] ... [zoneN]
Sanity check a CD testnet
Sanity check a testnet
name - name of the network
cloud - cloud provider to use (gce, ec2)
zone - cloud provider zone of the network
name - name of the network
cloud - cloud provider to use (gce, ec2)
zone1 .. zoneN - cloud provider zones to check
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
metrics
@ -27,10 +27,10 @@ EOF
netName=$1
cloudProvider=$2
zone=$3
[[ -n $netName ]] || usage ""
[[ -n $cloudProvider ]] || usage "Cloud provider not specified"
[[ -n $zone ]] || usage "Zone not specified"
shift 2
[[ -n $1 ]] || usage "zone1 not specified"
shutdown() {
exitcode=$?
@ -52,17 +52,19 @@ rm -f net/config/config
trap shutdown EXIT INT
set -x
echo "--- $cloudProvider.sh config"
timeout 5m net/"$cloudProvider".sh config -p "$netName" -z "$zone"
net/init-metrics.sh -e
echo "+++ $cloudProvider.sh info"
net/"$cloudProvider".sh info
echo --- net.sh sanity
ok=true
timeout 5m net/net.sh sanity \
${NO_LEDGER_VERIFY:+-o noLedgerVerify} \
${NO_VALIDATOR_SANITY:+-o noValidatorSanity} \
${REJECT_EXTRA_NODES:+-o rejectExtraNodes} || ok=false
for zone in "$@"; do
echo "--- $cloudProvider config [$zone]"
timeout 5m net/"$cloudProvider".sh config -p "$netName" -z "$zone"
net/init-metrics.sh -e
echo "+++ $cloudProvider.sh info"
net/"$cloudProvider".sh info
echo "--- net.sh sanity [$cloudProvider:$zone]"
ok=true
timeout 5m net/net.sh sanity $zone \
${NO_LEDGER_VERIFY:+-o noLedgerVerify} \
${NO_VALIDATOR_SANITY:+-o noValidatorSanity} \
${REJECT_EXTRA_NODES:+-o rejectExtraNodes} || ok=false
net/net.sh logs
$ok
net/net.sh logs
$ok
done