Fix gnocchi_statsd and ceilometer_agent_ipmi healthcheck

- statsd is connecting to redis only when it receives a data,
  hence to avoid false negatives we will rather test if the service
  is listening on proper port

- ceilometer_agent_ipmi connects to Redis instead of Rabbit for coordination
  now.

Closes-Bug: #1781108
Change-Id: I4414bac82981c30ba6b7c1c8b406baa7a0900e5a
(cherry picked from commit 218065b63e)
This commit is contained in:
Martin Mágr 2018-07-11 13:20:42 +02:00 committed by Emilien Macchi
parent fa22231bc7
commit a70d31c236
2 changed files with 5 additions and 8 deletions

View File

@ -3,12 +3,12 @@
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
process='ceilometer-polling'
args="${@:-5671 5672}"
args="${@:-6379}"
if healthcheck_port $process $args; then
exit 0
else
ports=${args// /,}
echo "There is no $process process with opened RabbitMQ ports ($ports) running in the container"
echo "There is no $process process with opened Redis ports ($ports) running in the container"
exit 1
fi

View File

@ -3,12 +3,9 @@
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
process='gnocchi-statsd'
args="${@:-6379}"
bind_port=$(get_config_val /etc/gnocchi/gnocchi.conf statsd port 8125)
if healthcheck_port $process $args; then
exit 0
else
ports=${args// /,}
echo "There is no $process process with opened Redis ports ($ports) running in the container"
if ! healthcheck_listen $process $bind_port; then
echo "There is no $process process listening on ports $bind_port in the container."
exit 1
fi