Retry rsync a couple times before failing
This commit is contained in:
parent
9f5c86e60c
commit
1d6c4aacae
|
@ -27,9 +27,8 @@ fi
|
||||||
|
|
||||||
case $deployMethod in
|
case $deployMethod in
|
||||||
snap)
|
snap)
|
||||||
rsync -vPrc "$entrypointIp:~/solana/solana.snap" .
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/solana/solana.snap" .
|
||||||
sudo snap install solana.snap --devmode --dangerous
|
sudo snap install solana.snap --devmode --dangerous
|
||||||
rm solana.snap
|
|
||||||
|
|
||||||
solana_bench_tps=/snap/bin/solana.bench-tps
|
solana_bench_tps=/snap/bin/solana.bench-tps
|
||||||
solana_keygen=/snap/bin/solana.keygen
|
solana_keygen=/snap/bin/solana.keygen
|
||||||
|
@ -39,7 +38,7 @@ local)
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
export SOLANA_DEFAULT_METRICS_RATE=1
|
export SOLANA_DEFAULT_METRICS_RATE=1
|
||||||
|
|
||||||
rsync -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
||||||
solana_bench_tps=solana-bench-tps
|
solana_bench_tps=solana-bench-tps
|
||||||
solana_keygen=solana-keygen
|
solana_keygen=solana-keygen
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -39,7 +39,8 @@ fi
|
||||||
case $deployMethod in
|
case $deployMethod in
|
||||||
snap)
|
snap)
|
||||||
SECONDS=0
|
SECONDS=0
|
||||||
rsync -vPrc "$entrypointIp:~/solana/solana.snap" .
|
[[ $nodeType = leader ]] ||
|
||||||
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/solana/solana.snap" .
|
||||||
sudo snap install solana.snap --devmode --dangerous
|
sudo snap install solana.snap --devmode --dangerous
|
||||||
|
|
||||||
commonNodeConfig="\
|
commonNodeConfig="\
|
||||||
|
@ -94,7 +95,7 @@ local)
|
||||||
./multinode-demo/leader.sh > leader.log 2>&1 &
|
./multinode-demo/leader.sh > leader.log 2>&1 &
|
||||||
;;
|
;;
|
||||||
validator)
|
validator)
|
||||||
rsync -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
||||||
|
|
||||||
./multinode-demo/setup.sh -t validator $setupArgs
|
./multinode-demo/setup.sh -t validator $setupArgs
|
||||||
./multinode-demo/validator.sh "$entrypointIp":~/solana "$entrypointIp:8001" >validator.log 2>&1 &
|
./multinode-demo/validator.sh "$entrypointIp":~/solana "$entrypointIp:8001" >validator.log 2>&1 &
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# rsync wrapper that retries a few times on failure
|
||||||
|
#
|
||||||
|
|
||||||
|
for i in $(seq 1 5); do
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
rsync "$@"
|
||||||
|
) && exit 0
|
||||||
|
echo Retry "$i"...
|
||||||
|
done
|
Loading…
Reference in New Issue