Disable node restart in localnet-sanity.sh
This commit is contained in:
parent
340d01665c
commit
1dce5976cf
@ -79,10 +79,12 @@ nodes=(
|
|||||||
"multinode-demo/drone.sh"
|
"multinode-demo/drone.sh"
|
||||||
"multinode-demo/bootstrap-leader.sh \
|
"multinode-demo/bootstrap-leader.sh \
|
||||||
--enable-rpc-exit \
|
--enable-rpc-exit \
|
||||||
|
--no-restart \
|
||||||
--init-complete-file init-complete-node1.log"
|
--init-complete-file init-complete-node1.log"
|
||||||
"multinode-demo/fullnode.sh \
|
"multinode-demo/fullnode.sh \
|
||||||
$maybeNoLeaderRotation \
|
$maybeNoLeaderRotation \
|
||||||
--enable-rpc-exit \
|
--enable-rpc-exit \
|
||||||
|
--no-restart \
|
||||||
--init-complete-file init-complete-node2.log \
|
--init-complete-file init-complete-node2.log \
|
||||||
--rpc-port 18899"
|
--rpc-port 18899"
|
||||||
)
|
)
|
||||||
@ -90,6 +92,7 @@ nodes=(
|
|||||||
for i in $(seq 1 $extraNodes); do
|
for i in $(seq 1 $extraNodes); do
|
||||||
nodes+=(
|
nodes+=(
|
||||||
"multinode-demo/fullnode.sh \
|
"multinode-demo/fullnode.sh \
|
||||||
|
--no-restart \
|
||||||
--label dyn$i \
|
--label dyn$i \
|
||||||
--init-complete-file init-complete-node$((2 + i)).log \
|
--init-complete-file init-complete-node$((2 + i)).log \
|
||||||
$maybeNoLeaderRotation"
|
$maybeNoLeaderRotation"
|
||||||
|
@ -28,6 +28,7 @@ Start a full node or a replicator
|
|||||||
--stake LAMPORTS - Number of lamports to stake
|
--stake LAMPORTS - Number of lamports to stake
|
||||||
--no-voting - start node without vote signer
|
--no-voting - start node without vote signer
|
||||||
--rpc-port port - custom RPC port for this node
|
--rpc-port port - custom RPC port for this node
|
||||||
|
--no-restart - do not restart the node if it exits
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
@ -146,6 +147,7 @@ stake=42 # number of lamports to assign as stake
|
|||||||
poll_for_new_genesis_block=0
|
poll_for_new_genesis_block=0
|
||||||
label=
|
label=
|
||||||
fullnode_keypair_path=
|
fullnode_keypair_path=
|
||||||
|
no_restart=0
|
||||||
|
|
||||||
positional_args=()
|
positional_args=()
|
||||||
while [[ -n $1 ]]; do
|
while [[ -n $1 ]]; do
|
||||||
@ -153,6 +155,9 @@ while [[ -n $1 ]]; do
|
|||||||
if [[ $1 = --label ]]; then
|
if [[ $1 = --label ]]; then
|
||||||
label="-$2"
|
label="-$2"
|
||||||
shift 2
|
shift 2
|
||||||
|
elif [[ $1 = --no-restart ]]; then
|
||||||
|
no_restart=1
|
||||||
|
shift
|
||||||
elif [[ $1 = --bootstrap-leader ]]; then
|
elif [[ $1 = --bootstrap-leader ]]; then
|
||||||
node_type=bootstrap_leader
|
node_type=bootstrap_leader
|
||||||
shift
|
shift
|
||||||
@ -361,6 +366,11 @@ while true; do
|
|||||||
pid=$!
|
pid=$!
|
||||||
oom_score_adj "$pid" 1000
|
oom_score_adj "$pid" 1000
|
||||||
|
|
||||||
|
if ((no_restart)); then
|
||||||
|
wait "$pid"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $node_type = bootstrap_leader ]]; then
|
if [[ $node_type = bootstrap_leader ]]; then
|
||||||
wait "$pid"
|
wait "$pid"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user