From 1dce5976cf8fdd6cd313c65a304fbf1454fe8fa5 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sun, 12 May 2019 21:07:31 -0700 Subject: [PATCH] Disable node restart in localnet-sanity.sh --- ci/localnet-sanity.sh | 3 +++ multinode-demo/fullnode.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/ci/localnet-sanity.sh b/ci/localnet-sanity.sh index b345c2e2f2..654d5437e2 100755 --- a/ci/localnet-sanity.sh +++ b/ci/localnet-sanity.sh @@ -79,10 +79,12 @@ nodes=( "multinode-demo/drone.sh" "multinode-demo/bootstrap-leader.sh \ --enable-rpc-exit \ + --no-restart \ --init-complete-file init-complete-node1.log" "multinode-demo/fullnode.sh \ $maybeNoLeaderRotation \ --enable-rpc-exit \ + --no-restart \ --init-complete-file init-complete-node2.log \ --rpc-port 18899" ) @@ -90,6 +92,7 @@ nodes=( for i in $(seq 1 $extraNodes); do nodes+=( "multinode-demo/fullnode.sh \ + --no-restart \ --label dyn$i \ --init-complete-file init-complete-node$((2 + i)).log \ $maybeNoLeaderRotation" diff --git a/multinode-demo/fullnode.sh b/multinode-demo/fullnode.sh index 2ea9d87df2..fc6106c939 100755 --- a/multinode-demo/fullnode.sh +++ b/multinode-demo/fullnode.sh @@ -28,6 +28,7 @@ Start a full node or a replicator --stake LAMPORTS - Number of lamports to stake --no-voting - start node without vote signer --rpc-port port - custom RPC port for this node + --no-restart - do not restart the node if it exits EOF exit 1 @@ -146,6 +147,7 @@ stake=42 # number of lamports to assign as stake poll_for_new_genesis_block=0 label= fullnode_keypair_path= +no_restart=0 positional_args=() while [[ -n $1 ]]; do @@ -153,6 +155,9 @@ while [[ -n $1 ]]; do if [[ $1 = --label ]]; then label="-$2" shift 2 + elif [[ $1 = --no-restart ]]; then + no_restart=1 + shift elif [[ $1 = --bootstrap-leader ]]; then node_type=bootstrap_leader shift @@ -361,6 +366,11 @@ while true; do pid=$! oom_score_adj "$pid" 1000 + if ((no_restart)); then + wait "$pid" + exit $? + fi + if [[ $node_type = bootstrap_leader ]]; then wait "$pid" sleep 1