Use consistent style

This commit is contained in:
Michael Vines 2018-09-07 08:49:22 -07:00
parent ab208ddb77
commit a2631e89f6
1 changed files with 7 additions and 7 deletions

View File

@ -113,7 +113,7 @@ build() {
echo "Build took $SECONDS seconds" echo "Build took $SECONDS seconds"
} }
common_start_setup() { startCommon() {
declare ipAddress=$1 declare ipAddress=$1
test -d "$SOLANA_ROOT" test -d "$SOLANA_ROOT"
ssh "${sshOptions[@]}" "$ipAddress" "mkdir -p ~/solana ~/.cargo/bin" ssh "${sshOptions[@]}" "$ipAddress" "mkdir -p ~/solana ~/.cargo/bin"
@ -131,7 +131,7 @@ startLeader() {
# binaries from the leader. # binaries from the leader.
( (
set -x set -x
common_start_setup "$ipAddress" || exit 1 startCommon "$ipAddress" || exit 1
case $deployMethod in case $deployMethod in
snap) snap)
rsync -vPrc -e "ssh ${sshOptions[*]}" "$snapFilename" "$ipAddress:~/solana/solana.snap" rsync -vPrc -e "ssh ${sshOptions[*]}" "$snapFilename" "$ipAddress:~/solana/solana.snap"
@ -160,7 +160,7 @@ startValidator() {
echo "--- Starting validator: $leaderIp" echo "--- Starting validator: $leaderIp"
( (
set -x set -x
common_start_setup "$ipAddress" startCommon "$ipAddress"
ssh "${sshOptions[@]}" -n "$ipAddress" \ ssh "${sshOptions[@]}" -n "$ipAddress" \
"./solana/net/remote/remote-node.sh $deployMethod validator $publicNetwork $entrypointIp $expectedNodeCount \"$RUST_LOG\"" "./solana/net/remote/remote-node.sh $deployMethod validator $publicNetwork $entrypointIp $expectedNodeCount \"$RUST_LOG\""
) >> "$netLogDir/validator-$ipAddress.log" 2>&1 & ) >> "$netLogDir/validator-$ipAddress.log" 2>&1 &
@ -176,7 +176,7 @@ startClient() {
( (
set -x set -x
common_start_setup "$ipAddress" startCommon "$ipAddress"
ssh "${sshOptions[@]}" -f "$ipAddress" \ ssh "${sshOptions[@]}" -f "$ipAddress" \
"./solana/net/remote/remote-client.sh $deployMethod $entrypointIp $expectedNodeCount \"$RUST_LOG\"" "./solana/net/remote/remote-client.sh $deployMethod $entrypointIp $expectedNodeCount \"$RUST_LOG\""
) >> "$logFile" 2>&1 || { ) >> "$logFile" 2>&1 || {
@ -293,7 +293,7 @@ start() {
} }
stop_node() { stopNode() {
local ipAddress=$1 local ipAddress=$1
echo "--- Stopping node: $ipAddress" echo "--- Stopping node: $ipAddress"
( (
@ -316,10 +316,10 @@ stop() {
SECONDS=0 SECONDS=0
$metricsWriteDatapoint "testnet-deploy net-stop-begin=1" $metricsWriteDatapoint "testnet-deploy net-stop-begin=1"
stop_node "$leaderIp" stopNode "$leaderIp"
for ipAddress in "${validatorIpList[@]}" "${clientIpList[@]}"; do for ipAddress in "${validatorIpList[@]}" "${clientIpList[@]}"; do
stop_node "$ipAddress" stopNode "$ipAddress"
done done
$metricsWriteDatapoint "testnet-deploy net-stop-complete=1" $metricsWriteDatapoint "testnet-deploy net-stop-complete=1"