testnet-edge/testnet-beta now update while preserving the ledger (#5979)

* Check if an update is current before deploying it again

* Add (new) update command to deploy testnet updates

* Add --deploy-if-newer flag to permit conditional net updates
This commit is contained in:
Michael Vines
2019-09-19 12:03:47 -07:00
committed by GitHub
parent 9917ece826
commit fee5c6c057
5 changed files with 68 additions and 39 deletions

View File

@ -21,7 +21,6 @@ delete=false
enableGpu=false
bootDiskType=""
blockstreamer=false
deployUpdateManifest=true
fetchLogs=true
maybeHashesPerTick=
maybeDisableAirdrops=
@ -123,9 +122,6 @@ while [[ -n $1 ]]; do
elif [[ $1 = --external-accounts-file ]]; then
maybeExternalPrimordialAccountsFile="$1 $2"
shift 2
elif [[ $1 = --skip-deploy-update ]]; then
deployUpdateManifest=false
shift 1
elif [[ $1 = --skip-remote-log-retrieval ]]; then
fetchLogs=false
shift 1
@ -153,7 +149,7 @@ while [[ -n $1 ]]; do
fi
done
while getopts "h?p:Pn:c:t:gG:a:Dd:rusxz:p:C:Sfew" opt "${shortArgs[@]}"; do
while getopts "h?p:Pn:c:t:gG:a:Dd:rusxz:p:C:Sfe" opt "${shortArgs[@]}"; do
case $opt in
h | \?)
usage
@ -223,10 +219,6 @@ while getopts "h?p:Pn:c:t:gG:a:Dd:rusxz:p:C:Sfew" opt "${shortArgs[@]}"; do
S)
stopNetwork=true
;;
w)
fetchLogs=false
deployUpdateManifest=false
;;
*)
usage "Unknown option: $opt"
;;
@ -365,8 +357,6 @@ ok=true
if ! $skipStart; then
(
if $skipCreate; then
# TODO: Enable rolling updates
#op=update
op=restart
else
op=start
@ -391,13 +381,6 @@ if ! $skipStart; then
args+=(-F)
fi
if $deployUpdateManifest; then
rm -f update_manifest_keypair.json
args+=(--deploy-update linux)
args+=(--deploy-update osx)
args+=(--deploy-update windows)
fi
# shellcheck disable=SC2206 # Do not want to quote
args+=(
$maybeHashesPerTick

View File

@ -219,6 +219,7 @@ sanity() {
NO_INSTALL_CHECK=1 \
NO_VALIDATOR_SANITY=1 \
ci/testnet-sanity.sh edge-testnet-solana-com gce us-west1-b
time net/net.sh restart --skip-setup --deploy-if-newer -t "$CHANNEL_OR_TAG"
)
;;
testnet-edge-perf)
@ -235,6 +236,7 @@ sanity() {
NO_INSTALL_CHECK=1 \
NO_VALIDATOR_SANITY=1 \
ci/testnet-sanity.sh beta-testnet-solana-com gce us-west1-b
time net/net.sh restart --skip-setup --deploy-if-newer -t "$CHANNEL_OR_TAG"
)
;;
testnet-beta-perf)
@ -376,6 +378,7 @@ deploy() {
${skipStart:+-s} \
${maybeStop:+-S} \
${maybeDelete:+-D}
time net/net.sh update -t "$CHANNEL_OR_TAG" --platform\ {linux,osx,windows}
)
;;
testnet-perf)
@ -405,7 +408,6 @@ deploy() {
NO_VALIDATOR_SANITY=1 \
ci/testnet-deploy.sh -p demo-testnet-solana-com -C gce ${GCE_ZONE_ARGS[@]} \
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P -u -f \
--skip-deploy-update \
--skip-remote-log-retrieval \
-a demo-testnet-solana-com \
${skipCreate:+-e} \
@ -418,7 +420,6 @@ deploy() {
NO_VALIDATOR_SANITY=1 \
ci/testnet-deploy.sh -p demo-testnet-solana-com2 -C gce ${GCE_LOW_QUOTA_ZONE_ARGS[@]} \
-t "$CHANNEL_OR_TAG" -n "$GCE_LOW_QUOTA_NODE_COUNT" -c 0 -P -f -x \
--skip-deploy-update \
--skip-remote-log-retrieval \
${skipCreate:+-e} \
${skipStart:+-s} \
@ -540,8 +541,7 @@ deploy() {
${maybeInternalNodesLamports} \
${maybeExternalAccountsFile} \
${maybeLamports} \
${maybeAdditionalDisk} \
--skip-deploy-update
${maybeAdditionalDisk}
)
;;
*)