parent
4576250342
commit
915956b94b
|
@ -51,11 +51,11 @@ runTest() {
|
|||
|
||||
build
|
||||
|
||||
runTest "Leader rotation on" \
|
||||
runTest "basic" \
|
||||
"ci/localnet-sanity.sh -i 128"
|
||||
|
||||
runTest "Leader rotation on, restart" \
|
||||
runTest "restart" \
|
||||
"ci/localnet-sanity.sh -i 128 -k 16"
|
||||
|
||||
runTest "Leader rotation on, incremental restart, extra node" \
|
||||
runTest "incremental restart, extra node" \
|
||||
"ci/localnet-sanity.sh -i 128 -k 16 -R -x"
|
||||
|
|
|
@ -20,7 +20,6 @@ tarChannelOrTag=edge
|
|||
delete=false
|
||||
enableGpu=false
|
||||
bootDiskType=""
|
||||
leaderRotation=true
|
||||
blockstreamer=false
|
||||
deployUpdateManifest=true
|
||||
fetchLogs=true
|
||||
|
@ -52,7 +51,6 @@ Deploys a CD testnet
|
|||
-P - Use public network IP addresses (default: $publicNetwork)
|
||||
-G - Enable GPU, and set count/type of GPUs to use (e.g n1-standard-16 --accelerator count=4,type=nvidia-tesla-k80)
|
||||
-g - Enable GPU (default: $enableGpu)
|
||||
-b - Disable leader rotation
|
||||
-a [address] - Set the bootstrap fullnode's external IP address to this GCE address
|
||||
-d [disk-type] - Specify a boot disk type (default None) Use pd-ssd to get ssd on GCE.
|
||||
-D - Delete the network
|
||||
|
@ -74,7 +72,7 @@ EOF
|
|||
|
||||
zone=()
|
||||
|
||||
while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:p:C:Sfew" opt; do
|
||||
while getopts "h?p:Pn:c:t:gG:a:Dd:rusxz:p:C:Sfew" opt; do
|
||||
case $opt in
|
||||
h | \?)
|
||||
usage
|
||||
|
@ -107,9 +105,6 @@ while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:p:C:Sfew" opt; do
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
b)
|
||||
leaderRotation=false
|
||||
;;
|
||||
g)
|
||||
enableGpu=true
|
||||
;;
|
||||
|
@ -230,10 +225,6 @@ if ! $skipCreate; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if ! $leaderRotation; then
|
||||
create_args+=(-b)
|
||||
fi
|
||||
|
||||
if $publicNetwork; then
|
||||
create_args+=(-P)
|
||||
fi
|
||||
|
|
|
@ -338,7 +338,6 @@ deploy() {
|
|||
RUST_LOG=solana=warn \
|
||||
ci/testnet-deploy.sh -p edge-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
${skipCreate:+-e} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
|
@ -351,7 +350,6 @@ deploy() {
|
|||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 -z us-west-1a \
|
||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \
|
||||
-b \
|
||||
${skipCreate:+-e} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
|
@ -366,7 +364,6 @@ deploy() {
|
|||
RUST_LOG=solana=warn \
|
||||
ci/testnet-deploy.sh -p beta-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
${skipCreate:+-e} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
|
@ -410,7 +407,6 @@ deploy() {
|
|||
ci/testnet-deploy.sh -p perf-testnet-solana-com -C gce -z us-west1-b \
|
||||
-G "--machine-type n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
|
||||
-t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
-d pd-ssd \
|
||||
${skipCreate:+-e} \
|
||||
${skipStart:+-s} \
|
||||
|
|
|
@ -36,7 +36,6 @@ clientIpListZone=()
|
|||
blockstreamerIpList=()
|
||||
blockstreamerIpListPrivate=()
|
||||
blockstreamerIpListZone=()
|
||||
leaderRotation=
|
||||
|
||||
buildSshOptions() {
|
||||
sshOptions=(
|
||||
|
@ -60,7 +59,6 @@ loadConfigFile() {
|
|||
[[ -n "$publicNetwork" ]] || usage "Config file invalid, publicNetwork unspecified: $configFile"
|
||||
[[ -n "$netBasename" ]] || usage "Config file invalid, netBasename unspecified: $configFile"
|
||||
[[ -n $sshPrivateKey ]] || usage "Config file invalid, sshPrivateKey unspecified: $configFile"
|
||||
[[ -n $leaderRotation ]] || usage "Config file invalid, leaderRotation unspecified: $configFile"
|
||||
[[ ${#fullnodeIpList[@]} -gt 0 ]] || usage "Config file invalid, fullnodeIpList unspecified: $configFile"
|
||||
[[ ${#fullnodeIpListPrivate[@]} -gt 0 ]] || usage "Config file invalid, fullnodeIpListPrivate unspecified: $configFile"
|
||||
[[ ${#fullnodeIpList[@]} -eq ${#fullnodeIpListPrivate[@]} ]] || usage "Config file invalid, fullnodeIpList/fullnodeIpListPrivate length mismatch: $configFile"
|
||||
|
|
39
net/gce.sh
39
net/gce.sh
|
@ -60,7 +60,6 @@ failOnValidatorBootupFailure=true
|
|||
publicNetwork=false
|
||||
enableGpu=false
|
||||
customAddress=
|
||||
leaderRotation=true
|
||||
zones=()
|
||||
|
||||
containsZone() {
|
||||
|
@ -113,7 +112,6 @@ Manage testnet instances
|
|||
* For EC2, [address] is the "allocation ID" of the desired
|
||||
Elastic IP.
|
||||
-d [disk-type] - Specify a boot disk type (default None) Use pd-ssd to get ssd on GCE.
|
||||
-b - Disable leader rotation
|
||||
|
||||
config-specific options:
|
||||
-P - Use public network IP addresses (default: $publicNetwork)
|
||||
|
@ -135,7 +133,7 @@ shift
|
|||
[[ $command = create || $command = config || $command = info || $command = delete ]] ||
|
||||
usage "Invalid command: $command"
|
||||
|
||||
while getopts "h?p:Pn:c:z:gG:a:d:buxf" opt; do
|
||||
while getopts "h?p:Pn:c:z:gG:a:d:uxf" opt; do
|
||||
case $opt in
|
||||
h | \?)
|
||||
usage
|
||||
|
@ -156,9 +154,6 @@ while getopts "h?p:Pn:c:z:gG:a:d:buxf" opt; do
|
|||
z)
|
||||
containsZone "$OPTARG" "${zones[@]}" || zones+=("$OPTARG")
|
||||
;;
|
||||
b)
|
||||
leaderRotation=false
|
||||
;;
|
||||
g)
|
||||
enableGpu=true
|
||||
bootstrapLeaderMachineType=$gpuBootstrapLeaderMachineType
|
||||
|
@ -320,7 +315,6 @@ prepareInstancesAndWriteConfigFile() {
|
|||
netBasename=$prefix
|
||||
publicNetwork=$publicNetwork
|
||||
sshPrivateKey=$sshPrivateKey
|
||||
leaderRotation=$leaderRotation
|
||||
EOF
|
||||
fi
|
||||
touch "$geoipConfigFile"
|
||||
|
@ -482,27 +476,17 @@ EOF
|
|||
delete() {
|
||||
$metricsWriteDatapoint "testnet-deploy net-delete-begin=1"
|
||||
|
||||
# Delete the bootstrap leader first to prevent unusual metrics on the dashboard
|
||||
# during shutdown (only applicable when leader rotation is disabled).
|
||||
# TODO: It would be better to fully cut-off metrics reporting before any
|
||||
# instances are deleted.
|
||||
filters=("$prefix-bootstrap-leader")
|
||||
for zone in "${zones[@]}"; do
|
||||
filters+=("$prefix-$zone")
|
||||
done
|
||||
# Filter for all other nodes (client, blockstreamer)
|
||||
filters+=("$prefix-")
|
||||
# Filter for all nodes
|
||||
filter="$prefix-"
|
||||
|
||||
for filter in "${filters[@]}"; do
|
||||
echo "Searching for instances: $filter"
|
||||
cloud_FindInstances "$filter"
|
||||
echo "Searching for instances: $filter"
|
||||
cloud_FindInstances "$filter"
|
||||
|
||||
if [[ ${#instances[@]} -eq 0 ]]; then
|
||||
echo "No instances found matching '$filter'"
|
||||
else
|
||||
cloud_DeleteInstances true &
|
||||
fi
|
||||
done
|
||||
if [[ ${#instances[@]} -eq 0 ]]; then
|
||||
echo "No instances found matching '$filter'"
|
||||
else
|
||||
cloud_DeleteInstances true &
|
||||
fi
|
||||
|
||||
wait
|
||||
|
||||
|
@ -513,7 +497,6 @@ delete() {
|
|||
fi
|
||||
|
||||
$metricsWriteDatapoint "testnet-deploy net-delete-complete=1"
|
||||
|
||||
}
|
||||
|
||||
case $command in
|
||||
|
@ -543,8 +526,6 @@ Network composition:
|
|||
Client(s) = $clientNodeCount x $clientMachineType
|
||||
Blockstreamer = $blockstreamer
|
||||
|
||||
Leader rotation: $leaderRotation
|
||||
|
||||
========================================================================================
|
||||
|
||||
EOF
|
||||
|
|
|
@ -294,7 +294,6 @@ startBootstrapLeader() {
|
|||
$((${#fullnodeIpList[@]} + ${#blockstreamerIpList[@]})) \
|
||||
\"$RUST_LOG\" \
|
||||
$skipSetup \
|
||||
$leaderRotation \
|
||||
$failOnValidatorBootupFailure \
|
||||
"
|
||||
) >> "$logFile" 2>&1 || {
|
||||
|
@ -322,7 +321,6 @@ startNode() {
|
|||
$((${#fullnodeIpList[@]} + ${#blockstreamerIpList[@]})) \
|
||||
\"$RUST_LOG\" \
|
||||
$skipSetup \
|
||||
$leaderRotation \
|
||||
$failOnValidatorBootupFailure \
|
||||
"
|
||||
) >> "$logFile" 2>&1 &
|
||||
|
@ -615,10 +613,6 @@ start)
|
|||
start
|
||||
;;
|
||||
update)
|
||||
$leaderRotation || {
|
||||
echo Warning: unable to update because leader rotation is disabled
|
||||
exit 1
|
||||
}
|
||||
skipSetup=true
|
||||
updateNodes=true
|
||||
start
|
||||
|
|
|
@ -10,8 +10,7 @@ entrypointIp="$3"
|
|||
numNodes="$4"
|
||||
RUST_LOG="$5"
|
||||
skipSetup="$6"
|
||||
leaderRotation="$7"
|
||||
failOnValidatorBootupFailure="$8"
|
||||
failOnValidatorBootupFailure="$7"
|
||||
set +x
|
||||
export RUST_LOG
|
||||
|
||||
|
@ -33,14 +32,12 @@ missing() {
|
|||
[[ -n $entrypointIp ]] || missing entrypointIp
|
||||
[[ -n $numNodes ]] || missing numNodes
|
||||
[[ -n $skipSetup ]] || missing skipSetup
|
||||
[[ -n $leaderRotation ]] || missing leaderRotation
|
||||
[[ -n $failOnValidatorBootupFailure ]] || missing failOnValidatorBootupFailure
|
||||
|
||||
cat > deployConfig <<EOF
|
||||
deployMethod="$deployMethod"
|
||||
entrypointIp="$entrypointIp"
|
||||
numNodes="$numNodes"
|
||||
leaderRotation=$leaderRotation
|
||||
failOnValidatorBootupFailure=$failOnValidatorBootupFailure
|
||||
EOF
|
||||
|
||||
|
@ -109,11 +106,7 @@ local|tar)
|
|||
--stake 0
|
||||
)
|
||||
else
|
||||
if $leaderRotation; then
|
||||
args+=("--stake" "$stake")
|
||||
else
|
||||
args+=("--stake" 0)
|
||||
fi
|
||||
args+=(--stake "$stake")
|
||||
args+=(--enable-rpc-exit)
|
||||
fi
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ missing() {
|
|||
[[ -n $deployMethod ]] || missing deployMethod
|
||||
[[ -n $entrypointIp ]] || missing entrypointIp
|
||||
[[ -n $numNodes ]] || missing numNodes
|
||||
[[ -n $leaderRotation ]] || missing leaderRotation
|
||||
[[ -n $failOnValidatorBootupFailure ]] || missing failOnValidatorBootupFailure
|
||||
|
||||
ledgerVerify=true
|
||||
|
|
Loading…
Reference in New Issue