Add new healthchecks for zaqar services

Zaqar has 2 containers, one for API (wsgi) and a second one for
websocket (python).

We therefore want to ensure the ports are in use in the containers.

Change-Id: I0d5ea0ba630714f7ec3ca4f1361e3235320e52d7
This commit is contained in:
Cédric Jeanneret 2019-04-24 17:58:01 +02:00
parent 9ca190828c
commit 4f5a275086
2 changed files with 21 additions and 0 deletions

6
healthcheck/zaqar-api Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-zaqar_wsgi.conf)
healthcheck_curl ${check_url}

15
healthcheck/zaqar-socket Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
process=zaqar-server
args="${@:-9000}"
if healthcheck_listen $process $args; then
exit 0
else
ports=${args// /,}
echo "There is no $process process, listening on port(s) $ports, running in the container."
exit 1
fi