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" echo "SOLANA_METRICS_CONFIG: $SOLANA_METRICS_CONFIG"
source scripts/configure-metrics.sh 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 ci/channel-info.sh
eval "$(ci/channel-info.sh)" eval "$(ci/channel-info.sh)"
@ -139,22 +142,19 @@ sanity() {
testnet-beta) testnet-beta)
( (
set -x 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) ok=true
for zone in "${GCE_ZONES[@]}"; do if [[ -n $EC2_NODE_COUNT ]]; then
if ! $ok; then ci/testnet-sanity.sh beta-testnet-solana-com ec2 "${EC2_ZONES[0]}" || ok=false
break 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 fi
ci/testnet-sanity.sh beta-testnet-solana-com gce "$zone" || ok=false ci/testnet-sanity.sh beta-testnet-solana-com gce "${GCE_ZONES[0]}" || ok=false
done fi
$ok $ok
) )
;; ;;
@ -227,8 +227,6 @@ start() {
testnet-beta) testnet-beta)
( (
set -x 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 ..." # Build an array to pass as opts to testnet-deploy.sh: "-z zone1 -z zone2 ..."
GCE_ZONE_ARGS=() GCE_ZONE_ARGS=()
@ -241,19 +239,23 @@ start() {
EC2_ZONE_ARGS+=("-z $val") EC2_ZONE_ARGS+=("-z $val")
done done
# shellcheck disable=SC2068 if [[ -n $EC2_NODE_COUNT ]]; then
[[ -z $EC2_NODE_COUNT ]] || ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 ${EC2_ZONE_ARGS[@]} \ # shellcheck disable=SC2068
-t "$CHANNEL_OR_TAG" -n "$EC2_NODE_COUNT" -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \ ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 ${EC2_ZONE_ARGS[@]} \
${maybeReuseLedger:+-r} \ -t "$CHANNEL_OR_TAG" -n "$EC2_NODE_COUNT" -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \
${maybeDelete:+-D} \ ${maybeReuseLedger:+-r} \
${GCE_NODE_COUNT:+-s} ${maybeDelete:+-D} \
${GCE_NODE_COUNT:+-s}
fi
# shellcheck disable=SC2068 if [[ -n $GCE_NODE_COUNT ]]; then
[[ -z $GCE_NODE_COUNT ]] || ci/testnet-deploy.sh -p beta-testnet-solana-com -C gce ${GCE_ZONE_ARGS[@]} \ # shellcheck disable=SC2068
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P \ ci/testnet-deploy.sh -p beta-testnet-solana-com -C gce ${GCE_ZONE_ARGS[@]} \
${maybeReuseLedger:+-r} \ -t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P \
${maybeDelete:+-D} \ ${maybeReuseLedger:+-r} \
${EC2_NODE_COUNT:+-x} ${maybeDelete:+-D} \
${EC2_NODE_COUNT:+-x}
fi
) )
;; ;;
testnet-beta-perf) testnet-beta-perf)

View File

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