Plumb --no-snapshot in from CI (#5077)

* Plumb --no-snapshot in from CI
This commit is contained in:
Dan Albert 2019-07-14 13:17:30 -06:00 committed by GitHub
parent 6c49b10784
commit 440d006ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 2 deletions

View File

@ -29,6 +29,7 @@ maybeExternalPrimordialAccountsFile=
maybeLamports=
maybeLetsEncrypt=
maybeFullnodeAdditionalDiskSize=
maybeNoSnapshot=
usage() {
exitcode=0
@ -82,7 +83,9 @@ Deploys a CD testnet
--letsencrypt [dns name]
- Attempt to generate a TLS certificate using this DNS name
--fullnode-additional-disk-size-gb [number]
- Size of additional disk in GB for all fullnodes
- Size of additional disk in GB for all fullnodes
--no-snapshot
- If set, disables booting validators from a snapshot
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
metrics
@ -122,6 +125,9 @@ while [[ -n $1 ]]; do
elif [[ $1 == --machine-type* ]]; then # Bypass quoted long args for GPUs
shortArgs+=("$1")
shift
elif [[ $1 = --no-snapshot ]]; then
maybeNoSnapshot="$1"
shift 1
else
usage "Unknown long option: $1"
fi
@ -396,6 +402,11 @@ if ! $skipStart; then
args+=($maybeLamports)
fi
if [[ -n $maybeNoSnapshot ]]; then
# shellcheck disable=SC2206
args+=($maybeNoSnapshot)
fi
time net/net.sh "${args[@]}"
) || ok=false

View File

@ -497,7 +497,8 @@ deploy() {
--external-accounts-file "$EXTERNAL_ACCOUNTS_FILE" \
--lamports 8589934592000000000 \
--skip-deploy-update \
--fullnode-additional-disk-size-gb 32000
--fullnode-additional-disk-size-gb 32000 \
--no-snapshot
)
;;

View File

@ -60,6 +60,8 @@ Operate a configured testnet
- Amount to stake internal nodes in genesis block. If set, airdrops are disabled.
--external-accounts-file FILE_PATH
- A YML file with a list of account pubkeys and corresponding stakes for external nodes
--no-snapshot
- If set, disables booting validators from a snapshot
sanity/start/update-specific options:
-F - Discard validator nodes that didn't bootup successfully
-o noLedgerVerify - Skip ledger verification
@ -97,6 +99,7 @@ numFullnodesRequested=
externalPrimordialAccountsFile=
remoteExternalPrimordialAccountsFile=
stakeNodesInGenesisBlock=
maybeNoSnapshot=""
command=$1
[[ -n $command ]] || usage
@ -114,6 +117,9 @@ while [[ -n $1 ]]; do
elif [[ $1 = --lamports ]]; then
genesisOptions="$genesisOptions $1 $2"
shift 2
elif [[ $1 = --no-snapshot ]]; then
maybeNoSnapshot="$1"
shift 1
elif [[ $1 = --deploy-update ]]; then
updatePlatforms="$updatePlatforms $2"
shift 2
@ -353,6 +359,7 @@ startBootstrapLeader() {
$numBenchTpsClients \"$benchTpsExtraArgs\" \
$numBenchExchangeClients \"$benchExchangeExtraArgs\" \
\"$genesisOptions\" \
$maybeNoSnapshot \
"
) >> "$logFile" 2>&1 || {
cat "$logFile"
@ -402,6 +409,7 @@ startNode() {
\"$stakeNodesInGenesisBlock\" \
$nodeIndex \
\"$genesisOptions\" \
$maybeNoSnapshot \
"
) >> "$logFile" 2>&1 &
declare pid=$!

View File

@ -19,6 +19,7 @@ benchTpsExtraArgs="${12}"
numBenchExchangeClients="${13}"
benchExchangeExtraArgs="${14}"
genesisOptions="${15}"
noSnapshot="${16}"
set +x
export RUST_LOG
@ -170,6 +171,7 @@ local|tar)
args+=(--no-airdrop)
fi
args+=(--init-complete-file "$initCompleteFile")
args+=("$noSnapshot")
nohup ./multinode-demo/validator.sh --bootstrap-leader "${args[@]}" > fullnode.log 2>&1 &
waitForNodeToInit
;;
@ -247,6 +249,7 @@ local|tar)
fi
args+=(--init-complete-file "$initCompleteFile")
args+=("$noSnapshot")
nohup ./multinode-demo/validator.sh "${args[@]}" > fullnode.log 2>&1 &
waitForNodeToInit
;;
@ -264,6 +267,7 @@ local|tar)
if [[ $skipSetup != true ]]; then
./multinode-demo/clear-config.sh
fi
args+=("$noSnapshot")
nohup ./multinode-demo/replicator.sh "${args[@]}" > fullnode.log 2>&1 &
sleep 1
;;