Add healthcheck script for neutron-sriov-agent

This patch adds script for docker health check of neutron-sriov-agent service.
The script checks existance of service with opened connections to RabbitMQ.

Change-Id: Ief543580e6b717bb9dba62b19ffe12aff5395ff9
This commit is contained in:
Martin Mágr 2018-03-22 12:35:13 +01:00
parent 40fc132c67
commit 4c45ba2690

14
healthcheck/neutron-sriov-agent Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
process='neutron-sriov-nic-agent'
args="${@:-5671 5672}"
if healthcheck_port $process $args; then
exit 0
else
ports=${args// /,}
echo "There is no $process process connected via RabbitMQ ports ($ports) running in the container"
exit 1
fi