You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by up...@apache.org on 2018/09/17 16:40:44 UTC

[geode] branch concourse-staging updated: GEODE-5714: Retry ssh connections in concourse

This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch concourse-staging
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/concourse-staging by this push:
     new 9f6b289  GEODE-5714: Retry ssh connections in concourse
9f6b289 is described below

commit 9f6b289cb593fb724af535e9a009f2340b525366
Author: Dan Smith <up...@apache.org>
AuthorDate: Thu Sep 13 15:19:44 2018 -0700

    GEODE-5714: Retry ssh connections in concourse
    
    Adding ConnectionAttempts=60 to all concourse scripts that are using
    ssh. We are seeing jobs occasionally fail with connection refused. If
    this is a transient issue, this change might fix it.
---
 ci/scripts/execute_build.sh   |  9 ++++-----
 ci/scripts/execute_tests.sh   | 10 ++++------
 ci/scripts/rsync_code_down.sh |  7 +++----
 ci/scripts/rsync_code_up.sh   |  5 ++---
 4 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/ci/scripts/execute_build.sh b/ci/scripts/execute_build.sh
index e2a45d2..442020a 100755
--- a/ci/scripts/execute_build.sh
+++ b/ci/scripts/execute_build.sh
@@ -65,6 +65,7 @@ echo -n "${FULL_PRODUCT_VERSION}" > ${GEODE_RESULTS_VERSION_FILE}
 DEFAULT_GRADLE_TASK_OPTIONS="--parallel --console=plain --no-daemon"
 
 SSHKEY_FILE="instance-data/sshkey"
+SSH_OPTIONS="-i ${SSHKEY_FILE} -o ConnectionAttempts=60 -o StrictHostKeyChecking=no"
 
 INSTANCE_NAME="$(cat instance-data/instance-name)"
 INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"
@@ -72,9 +73,7 @@ PROJECT="$(cat instance-data/project)"
 ZONE="$(cat instance-data/zone)"
 
 
-echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
-
-scp -i ${SSHKEY_FILE} ${SCRIPTDIR}/capture-call-stacks.sh geode@${INSTANCE_IP_ADDRESS}:.
+scp ${SSH_OPTIONS} ${SCRIPTDIR}/capture-call-stacks.sh geode@${INSTANCE_IP_ADDRESS}:.
 
 
 
@@ -90,7 +89,7 @@ fi
 
 
 if [ -v CALL_STACK_TIMEOUT ]; then
-  ssh -i ${SSHKEY_FILE} geode@${INSTANCE_IP_ADDRESS} "tmux new-session -d -s callstacks; tmux send-keys  ~/capture-call-stacks.sh\ ${PARALLEL_DUNIT}\ ${CALL_STACK_TIMEOUT} C-m"
+  ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "tmux new-session -d -s callstacks; tmux send-keys  ~/capture-call-stacks.sh\ ${PARALLEL_DUNIT}\ ${CALL_STACK_TIMEOUT} C-m"
 fi
 
 GRADLE_COMMAND="./gradlew \
@@ -98,4 +97,4 @@ GRADLE_COMMAND="./gradlew \
     build install"
 
 echo "${GRADLE_COMMAND}"
-ssh -i ${SSHKEY_FILE} geode@${INSTANCE_IP_ADDRESS} "mkdir -p tmp && cd geode && ${GRADLE_COMMAND}"
+ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "mkdir -p tmp && cd geode && ${GRADLE_COMMAND}"
diff --git a/ci/scripts/execute_tests.sh b/ci/scripts/execute_tests.sh
index c4bd456..08ba77a 100755
--- a/ci/scripts/execute_tests.sh
+++ b/ci/scripts/execute_tests.sh
@@ -45,16 +45,14 @@ DEFAULT_GRADLE_TASK_OPTIONS="${PARALLEL_GRADLE} --console=plain --no-daemon -x j
 
 
 SSHKEY_FILE="instance-data/sshkey"
+SSH_OPTIONS="-i ${SSHKEY_FILE} -o ConnectionAttempts=60 -o StrictHostKeyChecking=no"
 
 INSTANCE_NAME="$(cat instance-data/instance-name)"
 INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"
 PROJECT="$(cat instance-data/project)"
 ZONE="$(cat instance-data/zone)"
 
-
-echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
-
-scp -i ${SSHKEY_FILE} ${SCRIPTDIR}/capture-call-stacks.sh geode@${INSTANCE_IP_ADDRESS}:.
+scp ${SSH_OPTIONS} ${SCRIPTDIR}/capture-call-stacks.sh geode@${INSTANCE_IP_ADDRESS}:.
 
 
 
@@ -70,7 +68,7 @@ fi
 
 
 if [ -v CALL_STACK_TIMEOUT ]; then
-  ssh -i ${SSHKEY_FILE} geode@${INSTANCE_IP_ADDRESS} "tmux new-session -d -s callstacks; tmux send-keys  ~/capture-call-stacks.sh\ ${PARALLEL_DUNIT}\ ${CALL_STACK_TIMEOUT} C-m"
+  ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "tmux new-session -d -s callstacks; tmux send-keys  ~/capture-call-stacks.sh\ ${PARALLEL_DUNIT}\ ${CALL_STACK_TIMEOUT} C-m"
 fi
 
 SCM_PROPS="-PsourceRevision=\"$(cd geode; git rev-parse HEAD)\" -PsourceRepository=\"${SOURCE_REPOSITORY}\""
@@ -84,4 +82,4 @@ GRADLE_COMMAND="./gradlew \
     ${SCM_PROPS}"
 
 echo "${GRADLE_COMMAND}"
-ssh -i ${SSHKEY_FILE} geode@${INSTANCE_IP_ADDRESS} "bash -c 'mkdir -p tmp; cd geode; ${GRADLE_COMMAND}'"
+ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "bash -c 'mkdir -p tmp; cd geode; ${GRADLE_COMMAND}'"
diff --git a/ci/scripts/rsync_code_down.sh b/ci/scripts/rsync_code_down.sh
index a94bb90..15ff0e6 100755
--- a/ci/scripts/rsync_code_down.sh
+++ b/ci/scripts/rsync_code_down.sh
@@ -30,17 +30,16 @@ done
 SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 
 SSHKEY_FILE="instance-data/sshkey"
+SSH_OPTIONS="-i ${SSHKEY_FILE} -o ConnectionAttempts=60 -o StrictHostKeyChecking=no"
 
 INSTANCE_NAME="$(cat instance-data/instance-name)"
 INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"
 PROJECT="$(cat instance-data/project)"
 ZONE="$(cat instance-data/zone)"
 
-echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
-
 OUTPUT_DIR=${BASE_DIR}/geode-results
 
-ssh -i ${SSHKEY_FILE} geode@${INSTANCE_IP_ADDRESS} "bash -c 'cd geode; ./gradlew --no-daemon combineReports'"
+ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "bash -c 'cd geode; ./gradlew --no-daemon combineReports'"
 
-time rsync -e "ssh -i ${SSHKEY_FILE}" -ah geode@${INSTANCE_IP_ADDRESS}:geode ${OUTPUT_DIR}/
+time rsync -e "ssh ${SSH_OPTIONS}" -ah geode@${INSTANCE_IP_ADDRESS}:geode ${OUTPUT_DIR}/
 set +x
diff --git a/ci/scripts/rsync_code_up.sh b/ci/scripts/rsync_code_up.sh
index bd5cd56..4bddb7f 100755
--- a/ci/scripts/rsync_code_up.sh
+++ b/ci/scripts/rsync_code_up.sh
@@ -32,12 +32,11 @@ SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 REPODIR=$(cd geode; git rev-parse --show-toplevel)
 
 SSHKEY_FILE="instance-data/sshkey"
+SSH_OPTIONS="-i ${SSHKEY_FILE} -o ConnectionAttempts=60 -o StrictHostKeyChecking=no"
 
 INSTANCE_NAME="$(cat instance-data/instance-name)"
 INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"
 PROJECT="$(cat instance-data/project)"
 ZONE="$(cat instance-data/zone)"
 
-echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
-
-time rsync -e "ssh -i ${SSHKEY_FILE}" -ah ${REPODIR} geode@${INSTANCE_IP_ADDRESS}:.
+time rsync -e "ssh ${SSH_OPTIONS}" -ah ${REPODIR} geode@${INSTANCE_IP_ADDRESS}:.