Add --no-deploy option to allow restarting nodes without a software update (#5182)

This commit is contained in:
Michael Vines
2019-07-22 21:38:26 -07:00
committed by GitHub
parent a0ccdccff1
commit 5f81a67298
4 changed files with 75 additions and 52 deletions

View File

@ -72,6 +72,11 @@ Operate a configured testnet
- If set, validators will skip verifying
the ledger they already have saved to disk at
boot (results in a much faster boot)
--no-deploy
- Don't deploy new software, use the
existing deployment
sanity/start/update-specific options:
-F - Discard validator nodes that didn't bootup successfully
-o noLedgerVerify - Skip ledger verification
@ -137,6 +142,9 @@ while [[ -n $1 ]]; do
elif [[ $1 = --no-snapshot ]]; then
maybeNoSnapshot="$1"
shift 1
elif [[ $1 = --no-deploy ]]; then
deployMethod=skip
shift 1
elif [[ $1 = --skip-ledger-verify ]]; then
maybeSkipLedgerVerify="$1"
shift 1
@ -365,6 +373,8 @@ startBootstrapLeader() {
local)
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/farf/bin/* "$ipAddress:~/.cargo/bin/"
;;
skip)
;;
*)
usage "Internal error: invalid deployMethod: $deployMethod"
;;
@ -597,6 +607,8 @@ prepare_deploy() {
local)
build
;;
skip)
;;
*)
usage "Internal error: invalid deployMethod: $deployMethod"
;;
@ -694,6 +706,8 @@ deploy() {
local)
networkVersion="$(git rev-parse HEAD || echo local-unknown)"
;;
skip)
;;
*)
usage "Internal error: invalid deployMethod: $deployMethod"
;;

View File

@ -41,6 +41,8 @@ local|tar)
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
;;
skip)
;;
*)
echo "Unknown deployment method: $deployMethod"
exit 1

View File

@ -78,7 +78,7 @@ waitForNodeToInit() {
}
case $deployMethod in
local|tar)
local|tar|skip)
PATH="$HOME"/.cargo/bin:"$PATH"
export USE_INSTALL=1
@ -107,6 +107,7 @@ local|tar)
export SOLANA_CUDA=1
fi
set -x
if [[ $skipSetup != true ]]; then
rm -rf ./solana-node-keys
rm -rf ./solana-node-balances
mkdir ./solana-node-balances
@ -152,7 +153,7 @@ local|tar)
if [ -f ./solana-client-accounts/client-accounts.yml ]; then
genesisOptions+=" --primordial-keypairs-file ./solana-client-accounts/client-accounts.yml"
fi
if [[ $skipSetup != true ]]; then
args=(
--bootstrap-leader-stake-lamports "$stake"
)
@ -181,10 +182,14 @@ local|tar)
waitForNodeToInit
;;
validator|blockstreamer)
if [[ $deployMethod != skip ]]; then
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
fi
if [[ $skipSetup != true ]]; then
rm -f ~/solana/fullnode-identity.json
[[ -z $internalNodesLamports ]] || net/scripts/rsync-retry.sh -vPrc \
"$entrypointIp":~/solana/solana-node-keys/"$nodeIndex" ~/solana/fullnode-identity.json
fi
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
echo Selecting solana-validator-cuda
@ -263,7 +268,9 @@ local|tar)
waitForNodeToInit
;;
replicator)
if [[ $deployMethod != skip ]]; then
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
fi
args=(
"$entrypointIp":~/solana "$entrypointIp:8001"

View File

@ -67,7 +67,7 @@ source net/common.sh
loadConfigFile
case $deployMethod in
local|tar)
local|tar|skip)
PATH="$HOME"/.cargo/bin:"$PATH"
export USE_INSTALL=1
if [[ -r target/perf-libs/env.sh ]]; then