use ~/.solana instead of PWD to keep cargo happy, don't rsync --append

This commit is contained in:
Rob Walker 2018-08-09 17:42:25 -07:00
parent 8b41c415b7
commit 846ad61941
4 changed files with 8 additions and 11 deletions

View File

@ -51,15 +51,13 @@ rsync_leader_url=$(rsync_url "$leader")
) )
iteration=0 iteration=0
set -x
while true; do while true; do
(
set -x
$solana_bench_tps \ $solana_bench_tps \
-n "$count" \ -n "$count" \
-l "$SOLANA_CONFIG_CLIENT_DIR"/leader.json \ -l "$SOLANA_CONFIG_CLIENT_DIR"/leader.json \
-k "$SOLANA_CONFIG_CLIENT_DIR"/client.json \ -k "$SOLANA_CONFIG_CLIENT_DIR"/client.json \
"$@" "$@"
)
[[ -n $loop ]] || exit 0 [[ -n $loop ]] || exit 0
iteration=$((iteration + 1)) iteration=$((iteration + 1))
echo ------------------------------------------------------------------------ echo ------------------------------------------------------------------------

View File

@ -188,10 +188,10 @@ oom_score_adj() {
fi fi
} }
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config SOLANA_CONFIG_DIR=${SNAP_DATA:-~/.solana}/config
SOLANA_CONFIG_PRIVATE_DIR=${SNAP_DATA:-$PWD}/config-private SOLANA_CONFIG_PRIVATE_DIR=${SNAP_DATA:-~/.solana}/config-private
SOLANA_CONFIG_VALIDATOR_DIR=${SNAP_DATA:-$PWD}/config-validator SOLANA_CONFIG_VALIDATOR_DIR=${SNAP_DATA:-~/.solana}/config-validator
SOLANA_CONFIG_CLIENT_DIR=${SNAP_USER_DATA:-$PWD}/config-client SOLANA_CONFIG_CLIENT_DIR=${SNAP_USER_DATA:-~/.solana}/config-client
rsync_url() { # adds the 'rsync://` prefix to URLs that need it rsync_url() { # adds the 'rsync://` prefix to URLs that need it
declare url="$1" declare url="$1"

View File

@ -21,7 +21,7 @@ if [[ -d "$SNAP" ]]; then
fi fi
leader="$leader_address" leader="$leader_address"
else else
leader=${1:-${here}/..} # Default to local solana repo leader=${1:-~/.solana} # Default to ~/.solana for data
fi fi
[[ -f "$SOLANA_CONFIG_PRIVATE_DIR"/mint.json ]] || { [[ -f "$SOLANA_CONFIG_PRIVATE_DIR"/mint.json ]] || {

View File

@ -43,7 +43,7 @@ if [[ -d $SNAP ]]; then
leader=$leader_address leader=$leader_address
else else
if [[ -z $1 ]]; then if [[ -z $1 ]]; then
leader=${1:-${here}/..} # Default to local solana repo leader=${1:-~/.solana} # Default to ~/.solana for data
leader_address=${2:-127.0.0.1} # Default to local leader leader_address=${2:-127.0.0.1} # Default to local leader
elif [[ -z $2 ]]; then elif [[ -z $2 ]]; then
leader=$1 leader=$1
@ -94,8 +94,7 @@ rsync_leader_url=$(rsync_url "$leader")
tune_networking tune_networking
set -ex set -ex
$rsync --append --verbose --partial --progress --recursive \ $rsync -vPr "$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR"
"$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR"
[[ -d $SOLANA_LEADER_CONFIG_DIR/ledger ]] || { [[ -d $SOLANA_LEADER_CONFIG_DIR/ledger ]] || {
echo "Unable to retrieve ledger from $rsync_leader_url" echo "Unable to retrieve ledger from $rsync_leader_url"
exit 1 exit 1