Fix nova-api healthcheck in case of nova metadata wsgi

While we have a dedicated nova_metadata healthcheck script, the
nova_metadata and nova_api use the same container image and the current
nova api healtcheck script still checks the non wsgi implementation. This
changes the nova_api healthcheck script to check the metadata wsgi vhost
config for details instead of the details in nova.conf.

Change-Id: I028caee75e47618d5d0c55054ef33216d05d41b6
Closes-Bug: #1797514
(cherry picked from commit a77d5c86e2)
This commit is contained in:
Martin Schuppert 2018-10-12 08:47:17 +02:00
parent 52fe2f3cfc
commit 123616fe7f
2 changed files with 10 additions and 4 deletions

View File

@ -3,10 +3,8 @@
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
if ps -e | grep --quiet nova-api-metada; then
bind_host=$(get_config_val /etc/nova/nova.conf DEFAULT metadata_listen 127.0.0.1)
bind_port=$(get_config_val /etc/nova/nova.conf DEFAULT metadata_listen_port 8775)
check_url="http://${bind_host}:${bind_port}/"
if ps -ef | grep --quiet nova-metadata; then
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-nova_metadata_wsgi.conf)
else
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-nova_api_wsgi.conf)
fi

View File

@ -0,0 +1,8 @@
---
fixes:
- |
While we have a dedicated nova_metadata healthcheck script, the
nova_metadata and nova_api container the same image and the current nova
api healtcheck script still checks the non wsgi implementation. This
changes the nova_api healthcheck script to check the metadata wsgi vhost
config for details instead of the details in nova.conf.