Add healthcheck script for Tacker

This patch adds script for docker health check of tacker-server service.
The script checks API service using curl.

Change-Id: Iabc042d2539963fdc59ec538e269c83f87c1843f
This commit is contained in:
Martin Mágr 2018-01-22 14:09:15 +01:00
parent 1550e16d6e
commit 21c90acfef
1 changed files with 12 additions and 0 deletions

12
healthcheck/tacker Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
bind_host=$(get_config_val /etc/tacker/tacker.conf DEFAULT bind_host 127.0.0.1)
bind_port=$(get_config_val /etc/tacker/tacker.conf DEFAULT bind_port 9890)
# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
bind_host="[${bind_host}]"
fi
healthcheck_curl http://${bind_host}:${bind_port}/