Add and fix healthcheck scripts for Octavia services
- adds script for docker health check of octavia-api service - fix the check method for octavia-health-manager service - fix the check method for octavia-housekeeping service Change-Id: Ie8eaab9919bde61793a3310328ee9f117c4e58da
This commit is contained in:
parent
95cc729950
commit
dc342858a7
13
healthcheck/octavia-api
Executable file
13
healthcheck/octavia-api
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
||||||
|
|
||||||
|
bind_host=$(get_config_val /etc/octavia/octavia.conf api_settings bind_host 127.0.0.1)
|
||||||
|
bind_port=$(get_config_val /etc/octavia/octavia.conf api_settings bind_port 9876)
|
||||||
|
|
||||||
|
# Add brackets if IPv6
|
||||||
|
if [[ $bind_host =~ ":" ]]; then
|
||||||
|
bind_host="[${bind_host}]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
healthcheck_curl http://${bind_host}:${bind_port}/
|
@ -3,12 +3,12 @@
|
|||||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
||||||
|
|
||||||
process='octavia-health-manager'
|
process='octavia-health-manager'
|
||||||
args="${@:-5671 5672}"
|
args="${@:-5555}"
|
||||||
|
|
||||||
if healthcheck_port $process $args; then
|
if healthcheck_listen $process $args; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
ports=${args// /,}
|
ports=${args// /,}
|
||||||
echo "There is no $process process with opened RabbitMQ ports ($ports) running in the container"
|
echo "There is no $process process listening on ports $ports."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
||||||
|
|
||||||
process='octavia-housekeeping'
|
process='octavia-housekeeping'
|
||||||
args="${@:-5671 5672}"
|
args="${@:-3306}"
|
||||||
|
|
||||||
if healthcheck_port $process $args; then
|
if healthcheck_port $process $args; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
ports=${args// /,}
|
ports=${args// /,}
|
||||||
echo "There is no $process process with opened RabbitMQ ports ($ports) running in the container"
|
echo "Did not find $process process running and connected to MySQL via ports ($ports) in the container."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user