Add --no-deploy option to allow restarting nodes without a software update (#5182)
This commit is contained in:
14
net/net.sh
14
net/net.sh
@ -72,6 +72,11 @@ Operate a configured testnet
|
|||||||
- If set, validators will skip verifying
|
- If set, validators will skip verifying
|
||||||
the ledger they already have saved to disk at
|
the ledger they already have saved to disk at
|
||||||
boot (results in a much faster boot)
|
boot (results in a much faster boot)
|
||||||
|
--no-deploy
|
||||||
|
- Don't deploy new software, use the
|
||||||
|
existing deployment
|
||||||
|
|
||||||
|
|
||||||
sanity/start/update-specific options:
|
sanity/start/update-specific options:
|
||||||
-F - Discard validator nodes that didn't bootup successfully
|
-F - Discard validator nodes that didn't bootup successfully
|
||||||
-o noLedgerVerify - Skip ledger verification
|
-o noLedgerVerify - Skip ledger verification
|
||||||
@ -137,6 +142,9 @@ while [[ -n $1 ]]; do
|
|||||||
elif [[ $1 = --no-snapshot ]]; then
|
elif [[ $1 = --no-snapshot ]]; then
|
||||||
maybeNoSnapshot="$1"
|
maybeNoSnapshot="$1"
|
||||||
shift 1
|
shift 1
|
||||||
|
elif [[ $1 = --no-deploy ]]; then
|
||||||
|
deployMethod=skip
|
||||||
|
shift 1
|
||||||
elif [[ $1 = --skip-ledger-verify ]]; then
|
elif [[ $1 = --skip-ledger-verify ]]; then
|
||||||
maybeSkipLedgerVerify="$1"
|
maybeSkipLedgerVerify="$1"
|
||||||
shift 1
|
shift 1
|
||||||
@ -365,6 +373,8 @@ startBootstrapLeader() {
|
|||||||
local)
|
local)
|
||||||
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/farf/bin/* "$ipAddress:~/.cargo/bin/"
|
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/farf/bin/* "$ipAddress:~/.cargo/bin/"
|
||||||
;;
|
;;
|
||||||
|
skip)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage "Internal error: invalid deployMethod: $deployMethod"
|
usage "Internal error: invalid deployMethod: $deployMethod"
|
||||||
;;
|
;;
|
||||||
@ -597,6 +607,8 @@ prepare_deploy() {
|
|||||||
local)
|
local)
|
||||||
build
|
build
|
||||||
;;
|
;;
|
||||||
|
skip)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage "Internal error: invalid deployMethod: $deployMethod"
|
usage "Internal error: invalid deployMethod: $deployMethod"
|
||||||
;;
|
;;
|
||||||
@ -694,6 +706,8 @@ deploy() {
|
|||||||
local)
|
local)
|
||||||
networkVersion="$(git rev-parse HEAD || echo local-unknown)"
|
networkVersion="$(git rev-parse HEAD || echo local-unknown)"
|
||||||
;;
|
;;
|
||||||
|
skip)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage "Internal error: invalid deployMethod: $deployMethod"
|
usage "Internal error: invalid deployMethod: $deployMethod"
|
||||||
;;
|
;;
|
||||||
|
@ -41,6 +41,8 @@ local|tar)
|
|||||||
|
|
||||||
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
||||||
;;
|
;;
|
||||||
|
skip)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown deployment method: $deployMethod"
|
echo "Unknown deployment method: $deployMethod"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -78,7 +78,7 @@ waitForNodeToInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case $deployMethod in
|
case $deployMethod in
|
||||||
local|tar)
|
local|tar|skip)
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
|
|
||||||
@ -107,6 +107,7 @@ local|tar)
|
|||||||
export SOLANA_CUDA=1
|
export SOLANA_CUDA=1
|
||||||
fi
|
fi
|
||||||
set -x
|
set -x
|
||||||
|
if [[ $skipSetup != true ]]; then
|
||||||
rm -rf ./solana-node-keys
|
rm -rf ./solana-node-keys
|
||||||
rm -rf ./solana-node-balances
|
rm -rf ./solana-node-balances
|
||||||
mkdir ./solana-node-balances
|
mkdir ./solana-node-balances
|
||||||
@ -152,7 +153,7 @@ local|tar)
|
|||||||
if [ -f ./solana-client-accounts/client-accounts.yml ]; then
|
if [ -f ./solana-client-accounts/client-accounts.yml ]; then
|
||||||
genesisOptions+=" --primordial-keypairs-file ./solana-client-accounts/client-accounts.yml"
|
genesisOptions+=" --primordial-keypairs-file ./solana-client-accounts/client-accounts.yml"
|
||||||
fi
|
fi
|
||||||
if [[ $skipSetup != true ]]; then
|
|
||||||
args=(
|
args=(
|
||||||
--bootstrap-leader-stake-lamports "$stake"
|
--bootstrap-leader-stake-lamports "$stake"
|
||||||
)
|
)
|
||||||
@ -181,10 +182,14 @@ local|tar)
|
|||||||
waitForNodeToInit
|
waitForNodeToInit
|
||||||
;;
|
;;
|
||||||
validator|blockstreamer)
|
validator|blockstreamer)
|
||||||
|
if [[ $deployMethod != skip ]]; then
|
||||||
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
|
||||||
|
fi
|
||||||
|
if [[ $skipSetup != true ]]; then
|
||||||
rm -f ~/solana/fullnode-identity.json
|
rm -f ~/solana/fullnode-identity.json
|
||||||
[[ -z $internalNodesLamports ]] || net/scripts/rsync-retry.sh -vPrc \
|
[[ -z $internalNodesLamports ]] || net/scripts/rsync-retry.sh -vPrc \
|
||||||
"$entrypointIp":~/solana/solana-node-keys/"$nodeIndex" ~/solana/fullnode-identity.json
|
"$entrypointIp":~/solana/solana-node-keys/"$nodeIndex" ~/solana/fullnode-identity.json
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
|
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
|
||||||
echo Selecting solana-validator-cuda
|
echo Selecting solana-validator-cuda
|
||||||
@ -263,7 +268,9 @@ local|tar)
|
|||||||
waitForNodeToInit
|
waitForNodeToInit
|
||||||
;;
|
;;
|
||||||
replicator)
|
replicator)
|
||||||
|
if [[ $deployMethod != skip ]]; then
|
||||||
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
|
||||||
|
fi
|
||||||
|
|
||||||
args=(
|
args=(
|
||||||
"$entrypointIp":~/solana "$entrypointIp:8001"
|
"$entrypointIp":~/solana "$entrypointIp:8001"
|
||||||
|
@ -67,7 +67,7 @@ source net/common.sh
|
|||||||
loadConfigFile
|
loadConfigFile
|
||||||
|
|
||||||
case $deployMethod in
|
case $deployMethod in
|
||||||
local|tar)
|
local|tar|skip)
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
if [[ -r target/perf-libs/env.sh ]]; then
|
if [[ -r target/perf-libs/env.sh ]]; then
|
||||||
|
Reference in New Issue
Block a user