Update portal control scripts, so they can talk to the new health-check container.
This commit is contained in:
parent
7bd54359e6
commit
5473b8475a
|
@ -2,15 +2,17 @@
|
||||||
|
|
||||||
set -e # exit on first error
|
set -e # exit on first error
|
||||||
|
|
||||||
while getopts d:t: flag
|
while getopts d:t:r: flag
|
||||||
do
|
do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
d) delay=${OPTARG};;
|
d) delay=${OPTARG};;
|
||||||
t) timeout=${OPTARG};;
|
t) timeout=${OPTARG};;
|
||||||
|
r) reason=${OPTARG};;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
delay=${delay:-0} # default to no delay
|
delay=${delay:-0} # default to no delay
|
||||||
timeout=${timeout:-300} # default timeout is 300s
|
timeout=${timeout:-300} # default timeout is 300s
|
||||||
|
reason=${reason:-"disabled manually"}
|
||||||
|
|
||||||
countdown() {
|
countdown() {
|
||||||
local secs=$1
|
local secs=$1
|
||||||
|
@ -25,7 +27,7 @@ countdown() {
|
||||||
countdown $delay
|
countdown $delay
|
||||||
|
|
||||||
# stop healh-check so the server is taken our of load balancer
|
# stop healh-check so the server is taken our of load balancer
|
||||||
docker exec health-check cli/disable
|
docker exec health-check cli disable $reason
|
||||||
|
|
||||||
# then wait 5 minutes for the load balancer to propagate the dns records
|
# then wait 5 minutes for the load balancer to propagate the dns records
|
||||||
countdown $timeout
|
countdown $timeout
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
set -e # exit on first error
|
set -e # exit on first error
|
||||||
|
|
||||||
# start the health-checks service
|
# start the health-checks service
|
||||||
docker exec health-check cli/enable
|
docker exec health-check cli enable
|
||||||
|
|
Reference in New Issue