Disable node restart in localnet-sanity.sh

This commit is contained in:
Michael Vines 2019-05-12 21:07:31 -07:00
parent 340d01665c
commit 1dce5976cf
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
2 changed files with 13 additions and 0 deletions

View File

@ -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"

View File

@ -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