From 915956b94ba526fd825131532c12960681d88be3 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 15 May 2019 15:16:45 -0700 Subject: [PATCH] Remove disable leader rotation option (#4299) automerge --- ci/iterations-localnet.sh | 6 +++--- ci/testnet-deploy.sh | 11 +---------- ci/testnet-manager.sh | 4 ---- net/common.sh | 2 -- net/gce.sh | 39 ++++++++++--------------------------- net/net.sh | 6 ------ net/remote/remote-node.sh | 11 ++--------- net/remote/remote-sanity.sh | 1 - 8 files changed, 16 insertions(+), 64 deletions(-) diff --git a/ci/iterations-localnet.sh b/ci/iterations-localnet.sh index 6e2e07a336..6dc3b29900 100755 --- a/ci/iterations-localnet.sh +++ b/ci/iterations-localnet.sh @@ -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" diff --git a/ci/testnet-deploy.sh b/ci/testnet-deploy.sh index 17552bb4cb..60de0d72f5 100755 --- a/ci/testnet-deploy.sh +++ b/ci/testnet-deploy.sh @@ -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 diff --git a/ci/testnet-manager.sh b/ci/testnet-manager.sh index 69ca15506b..c778e6a5dd 100755 --- a/ci/testnet-manager.sh +++ b/ci/testnet-manager.sh @@ -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} \ diff --git a/net/common.sh b/net/common.sh index 69fd847679..9730c6dd39 100644 --- a/net/common.sh +++ b/net/common.sh @@ -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" diff --git a/net/gce.sh b/net/gce.sh index 47a59fa71d..01fe137d13 100755 --- a/net/gce.sh +++ b/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 diff --git a/net/net.sh b/net/net.sh index f1d48f3cda..19ed0c5302 100755 --- a/net/net.sh +++ b/net/net.sh @@ -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 diff --git a/net/remote/remote-node.sh b/net/remote/remote-node.sh index 23f6af4875..7692c53989 100755 --- a/net/remote/remote-node.sh +++ b/net/remote/remote-node.sh @@ -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 <