This repository was archived by the owner on Jan 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,14 +31,19 @@ done < <(gcloud compute instances list --filter="labels.testnet-mode=validator"
3131
3232
3333echo " --- Refreshing"
34- nodeConfig= " mode= leader+drone enable-cuda=1 metrics-config= $SOLANA_METRICS_CONFIG "
34+ leader=true
3535for info in " ${vmlist[@]} " ; do
3636 vmName=${info%:* }
3737 vmZone=${info#*: }
3838 echo " Starting refresh for $vmName "
3939
4040 (
4141 echo " --- Processing $vmName in zone $vmZone "
42+ if $leader ; then
43+ nodeConfig=" mode=leader+drone enable-cuda=1 metrics-config=$SOLANA_METRICS_CONFIG "
44+ else
45+ nodeConfig=" mode=validator metrics-config=$SOLANA_METRICS_CONFIG "
46+ fi
4247 cat > " autogen-refresh-$vmName .sh" << EOF
4348 set -x
4449 sudo snap remove solana
5358 --ssh-flag=" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -t" \
5459 --command=" bash ./autogen-refresh-$vmName .sh"
5560 ) > " log-$vmName .txt" 2>&1 &
56- nodeConfig=" mode=validator metrics-config=$SOLANA_METRICS_CONFIG "
61+
62+ if $leader ; then
63+ echo Waiting for leader...
64+ # Wait for the leader to initialize before starting the validators
65+ # TODO: Remove this limitation eventually.
66+ wait
67+ fi
68+ leader=false
5769done
5870
59- echo " Waiting..."
71+ echo Waiting for validators ...
6072wait
6173
6274for info in " ${vmlist[@]} " ; do
You can’t perform that action at this time.
0 commit comments