loadgenerator: exit faster on SIGTERM
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
457e2edbdf
commit
021660bb95
2 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,7 @@ spec:
|
||||||
- name: wait-frontend
|
- name: wait-frontend
|
||||||
image: alpine:3.6
|
image: alpine:3.6
|
||||||
command: ['sh', '-c', 'set -x; apk add --no-cache curl;
|
command: ['sh', '-c', 'set -x; apk add --no-cache curl;
|
||||||
until curl -f "http://${FRONTEND_ADDR}"; do
|
until timeout -t 2 curl -f "http://${FRONTEND_ADDR}"; do
|
||||||
echo "waiting for http://${FRONTEND_ADDR}";
|
echo "waiting for http://${FRONTEND_ADDR}";
|
||||||
sleep 2;
|
sleep 2;
|
||||||
done;']
|
done;']
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
trap "exit" TERM
|
||||||
|
|
||||||
if [[ -z "${FRONTEND_ADDR}" ]]; then
|
if [[ -z "${FRONTEND_ADDR}" ]]; then
|
||||||
echo >&2 "FRONTEND_ADDR not specified"
|
echo >&2 "FRONTEND_ADDR not specified"
|
||||||
|
|
Loading…
Add table
Reference in a new issue