Skip to content

Commit

Permalink
time the pssh calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nchammas committed Nov 18, 2014
1 parent 1d7270a commit d9333af
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ source /root/.bash_profile
source ec2-variables.sh

function approve_ssh_keys () {
pssh --inline \
--host "localhost $(hostname) $MASTERS $SLAVES" \
--user root \
--extra-args "$SSH_OPTS" \
":"
time {
pssh --inline \
--host "localhost $(hostname) $MASTERS $SLAVES" \
--user root \
--extra-args "$SSH_OPTS" \
":"
}
echo " ✝ approve_ssh_keys"
}

# Set hostname based on EC2 private DNS name, so that it is set correctly
Expand Down Expand Up @@ -65,11 +68,14 @@ done
wait

echo "Running setup-slave on all cluster nodes to mount filesystems, etc..."
pssh --inline \
--host "$MASTERS $SLAVES" \
--user root \
--extra-args "-t -t $SSH_OPTS" \
"spark-ec2/setup-slave.sh"
time {
pssh --inline \
--host "$MASTERS $SLAVES" \
--user root \
--extra-args "-t -t $SSH_OPTS" \
"spark-ec2/setup-slave.sh"
}
echo " ✝ setup-slave"

echo "SSH-ing to all cluster nodes to re-approve keys..."
# We do this again because setup-slave.sh clears out .ssh/known_hosts.
Expand Down

0 comments on commit d9333af

Please sign in to comment.