From 081b6035279c267db1d85814fb0531fc7dfee0f3 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 2 Feb 2017 16:52:30 -0800 Subject: [PATCH 1/2] Stress test client service config (in kubernetes) need not be of 'LoadBalancers' This fixes the GCP console slowness for grpc-testing project Fixed the docker image building script to remove the "-f" option (that is now deprecated) from 'docker tag' command. --- tools/run_tests/dockerize/build_interop_stress_image.sh | 2 +- tools/run_tests/stress_test/cleanup_docker_images.sh | 3 +++ tools/run_tests/stress_test/run_on_gke.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 tools/run_tests/stress_test/cleanup_docker_images.sh diff --git a/tools/run_tests/dockerize/build_interop_stress_image.sh b/tools/run_tests/dockerize/build_interop_stress_image.sh index 4407c8da90c..772eab0c618 100755 --- a/tools/run_tests/dockerize/build_interop_stress_image.sh +++ b/tools/run_tests/dockerize/build_interop_stress_image.sh @@ -98,7 +98,7 @@ CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" $BASE_IMAGE \ bash -l /var/local/jenkins/grpc/tools/dockerfile/stress_test/$BASE_NAME/build_interop_stress.sh \ && docker commit $CONTAINER_NAME $INTEROP_IMAGE \ - && ( if [ -n "$INTEROP_IMAGE_REPOSITORY_TAG" ]; then docker tag -f $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG ; fi ) \ + && ( if [ -n "$INTEROP_IMAGE_REPOSITORY_TAG" ]; then docker tag $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG ; fi ) \ && echo "Successfully built image $INTEROP_IMAGE") EXITCODE=$? diff --git a/tools/run_tests/stress_test/cleanup_docker_images.sh b/tools/run_tests/stress_test/cleanup_docker_images.sh new file mode 100755 index 00000000000..be3e764251b --- /dev/null +++ b/tools/run_tests/stress_test/cleanup_docker_images.sh @@ -0,0 +1,3 @@ +#!/bin/bash +for img in `docker images | grep \ | awk '{print $3 }'` ; do docker rmi -f $img; done + diff --git a/tools/run_tests/stress_test/run_on_gke.py b/tools/run_tests/stress_test/run_on_gke.py index 583e58316f4..e2be76e245a 100755 --- a/tools/run_tests/stress_test/run_on_gke.py +++ b/tools/run_tests/stress_test/run_on_gke.py @@ -312,7 +312,7 @@ class Gke: [container_cmd], [], # Empty args list since all args are passed via env variables client_env, - False # Client is not a headless service. + True # Client is a headless service (no need for an external ip) ) if not is_success: From 3883da2c4503e4146f1c39d17ec814b06c1d52f3 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 2 Feb 2017 20:11:08 -0800 Subject: [PATCH 2/2] add copyright --- .../stress_test/cleanup_docker_images.sh | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tools/run_tests/stress_test/cleanup_docker_images.sh b/tools/run_tests/stress_test/cleanup_docker_images.sh index be3e764251b..e424fcfd99b 100755 --- a/tools/run_tests/stress_test/cleanup_docker_images.sh +++ b/tools/run_tests/stress_test/cleanup_docker_images.sh @@ -1,3 +1,31 @@ #!/bin/bash +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. for img in `docker images | grep \ | awk '{print $3 }'` ; do docker rmi -f $img; done