You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2018/08/01 02:47:27 UTC

[geode] 01/02: Revert "GEODE-5500 retry start_instance on failure (#2229)"

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

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit fdc7d0e67f66b6f0ce573a816bb96ebe6b0be7fe
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Tue Jul 31 19:45:59 2018 -0700

    Revert "GEODE-5500 retry start_instance on failure (#2229)"
    
    This reverts commit 7dbd8a5ce8a033747c5d5299583245a1c23c59b9.
---
 ci/pipelines/geode-build/test-template.yml |  3 +-
 ci/pipelines/pull-request/pr-template.yml  | 19 +-----------
 ci/scripts/start_instance.sh               | 46 ++++++++++++------------------
 3 files changed, 20 insertions(+), 48 deletions(-)

diff --git a/ci/pipelines/geode-build/test-template.yml b/ci/pipelines/geode-build/test-template.yml
index 6cb8779..cd0c1b3 100644
--- a/ci/pipelines/geode-build/test-template.yml
+++ b/ci/pipelines/geode-build/test-template.yml
@@ -40,8 +40,7 @@ jobs:
       - do:
         - put: concourse-metadata-resource
         - task: start_instance
-          timeout: 15m
-          attempts: 100
+          timeout: 5m
           config:
             inputs:
             - name: concourse-metadata-resource
diff --git a/ci/pipelines/pull-request/pr-template.yml b/ci/pipelines/pull-request/pr-template.yml
index 6cbc6d3..84c25c0 100644
--- a/ci/pipelines/pull-request/pr-template.yml
+++ b/ci/pipelines/pull-request/pr-template.yml
@@ -72,24 +72,7 @@ jobs:
               GEODE_FORK: (( grab metadata.geode-fork ))
             run:
               path: geode/ci/scripts/start_instance.sh
-    - task: start_instance
-      image: alpine-tools-image
-      timeout: 15m
-      attempts: 100
-      config:
-        inputs:
-          - name: concourse-metadata-resource
-          - name: geode
-        outputs:
-          - name: instance-data
-        platform: linux
-        params:
-          CPUS: (( grab metadata.job.cpus ))
-          RAM: (( grab metadata.job.ram ))
-          GEODE_BRANCH: (( grab metadata.geode-build-branch ))
-          GEODE_FORK: (( grab metadata.geode-fork ))
-        run:
-          path: geode/ci/scripts/start_instance.sh
+
     - task: rsync_code_up
       timeout: 5m
       config:
diff --git a/ci/scripts/start_instance.sh b/ci/scripts/start_instance.sh
index 7bdd1fb..0b5126b 100755
--- a/ci/scripts/start_instance.sh
+++ b/ci/scripts/start_instance.sh
@@ -60,39 +60,29 @@ echo "${PROJECT}" > "instance-data/project"
 echo "${ZONE}" > "instance-data/zone"
 
 echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
+echo "RAM is ${RAM}"
 RAM_MEGABYTES=$( expr ${RAM} \* 1024 )
+echo "RAM_MEGABYTES is ${RAM_MEGABYTES}"
 
-while true; do
-    TTL=$(($(date +%s) + 60 * 60 * 6))
-
-    set +e
-    INSTANCE_INFORMATION=$(gcloud compute --project=${PROJECT} instances create ${INSTANCE_NAME} \
-      --zone=${ZONE} \
-      --machine-type=custom-${CPUS}-${RAM_MEGABYTES} \
-      --min-cpu-platform=Intel\ Skylake \
-      --image-family="${IMAGE_FAMILY_PREFIX}geode-builder" \
-      --image-project=${PROJECT} \
-      --boot-disk-size=100GB \
-      --boot-disk-type=pd-ssd \
-      --labels=time-to-live=${TTL} \
-      --format=json)
-    CREATE_EXIT_STATUS=$?
-    set -e
-
-    if [ ${CREATE_EXIT_STATUS} -eq 0 ]; then
-        break
-    fi
-
-    TIMEOUT=60
-    echo "Waiting ${TIMEOUT} seconds..."
-    sleep ${TIMEOUT}
-done
+TTL=$(($(date +%s) + 60 * 60 * 6))
 
-echo "${INSTANCE_INFORMATION}" > instance-data/instance-information
+INSTANCE_INFORMATION=$(gcloud compute --project=${PROJECT} instances create ${INSTANCE_NAME} \
+  --zone=${ZONE} \
+  --machine-type=custom-${CPUS}-${RAM_MEGABYTES} \
+  --min-cpu-platform=Intel\ Skylake \
+  --image-family="${IMAGE_FAMILY_PREFIX}geode-builder" \
+  --image-project=${PROJECT} \
+  --boot-disk-size=100GB \
+  --boot-disk-type=pd-ssd \
+  --labels=time-to-live=${TTL} \
+  --format=json)
+CREATE_EXIT_STATUS=$?
 
-INSTANCE_IP_ADDRESS=$(echo ${INSTANCE_INFORMATION} | jq -r '.[].networkInterfaces[0].accessConfigs[0].natIP')
-echo "${INSTANCE_IP_ADDRESS}" > "instance-data/instance-ip-address"
 
 while ! gcloud compute --project=${PROJECT} ssh geode@${INSTANCE_NAME} --zone=${ZONE} --ssh-key-file=${SSHKEY_FILE} --quiet -- true; do
   echo -n .
 done
+echo "${INSTANCE_INFORMATION}" > instance-data/instance-information
+
+INSTANCE_IP_ADDRESS=$(echo ${INSTANCE_INFORMATION} | jq -r '.[].networkInterfaces[0].accessConfigs[0].natIP')
+echo "${INSTANCE_IP_ADDRESS}" > "instance-data/instance-ip-address"