don't check for snap mode in common.sh, is only relevant to snap daemons (#1113)
snap mode is for daemons, remove it from client (i.e. common.sh) supply leader info to client via snap
This commit is contained in:
parent
a99dbb2a0c
commit
61abee204f
|
@ -264,10 +264,19 @@ client_start() {
|
||||||
declare vmPublicIp=$3
|
declare vmPublicIp=$3
|
||||||
declare count=$4
|
declare count=$4
|
||||||
|
|
||||||
|
nodeConfig="\
|
||||||
|
rust-log=$RUST_LOG \
|
||||||
|
default-metrics-rate=$SOLANA_DEFAULT_METRICS_RATE \
|
||||||
|
metrics-config=$SOLANA_METRICS_CONFIG \
|
||||||
|
setup-args=$SOLANA_SETUP_ARGS \
|
||||||
|
leader-ip=$publicIp \
|
||||||
|
"
|
||||||
|
|
||||||
vm_exec "$vmName" "$vmZone" "$vmPublicIp" \
|
vm_exec "$vmName" "$vmZone" "$vmPublicIp" \
|
||||||
"Starting client $count:" \
|
"Starting client $count:" \
|
||||||
"\
|
"\
|
||||||
set -x;
|
set -x;
|
||||||
|
sudo snap set solana $nodeConfig; \
|
||||||
snap info solana; \
|
snap info solana; \
|
||||||
sudo snap get solana; \
|
sudo snap get solana; \
|
||||||
threadCount=\$(nproc); \
|
threadCount=\$(nproc); \
|
||||||
|
|
|
@ -166,9 +166,6 @@ find_leader() {
|
||||||
declare shift=0
|
declare shift=0
|
||||||
|
|
||||||
if [[ -d $SNAP ]]; then
|
if [[ -d $SNAP ]]; then
|
||||||
# Exit if mode is not yet configured
|
|
||||||
# (typically the case after the Snap is first installed)
|
|
||||||
[[ -n $(snapctl get mode) ]] || exit 0
|
|
||||||
|
|
||||||
# Select leader from the Snap configuration
|
# Select leader from the Snap configuration
|
||||||
leader_ip=$(snapctl get leader-ip)
|
leader_ip=$(snapctl get leader-ip)
|
||||||
|
|
|
@ -9,6 +9,12 @@ source "$here"/common.sh
|
||||||
# shellcheck source=scripts/oom-score-adj.sh
|
# shellcheck source=scripts/oom-score-adj.sh
|
||||||
source "$here"/../scripts/oom-score-adj.sh
|
source "$here"/../scripts/oom-score-adj.sh
|
||||||
|
|
||||||
|
if [[ -d "$SNAP" ]]; then
|
||||||
|
# Exit if mode is not yet configured
|
||||||
|
# (typically the case after the Snap is first installed)
|
||||||
|
[[ -n "$(snapctl get mode)" ]] || exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
if [[ -n $1 ]]; then
|
if [[ -n $1 ]]; then
|
||||||
echo "$*"
|
echo "$*"
|
||||||
|
|
Loading…
Reference in New Issue