Add healthcheck script for Nova metadata
This patch adds script for docker health check of Nova metadata API service. The script checks API service using curl. Existing script healthcheck/nova-metadata is also removed as this script is linked in nova_metadata_footer template block. This block does not exist (anymore?) and we have to have metadata check as part of nova-api check, because those two services share container image. Change-Id: I597efc57f9c564409b566c598d9d2467bb31d8cd
This commit is contained in:
parent
da0b138ba4
commit
1760afaacc
@ -399,12 +399,6 @@ RUN mkdir -p /openstack && \
|
||||
chmod a+rx /openstack/healthcheck
|
||||
{% endblock %}
|
||||
|
||||
{% block nova_metadata_footer %}
|
||||
RUN mkdir -p /openstack && \
|
||||
ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-metadata /openstack/healthcheck && \
|
||||
chmod a+rx /openstack/healthcheck
|
||||
{% endblock %}
|
||||
|
||||
{% block nova_novncproxy_footer %}
|
||||
RUN mkdir -p /openstack && \
|
||||
ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-vnc-proxy /openstack/healthcheck && \
|
||||
|
@ -2,5 +2,13 @@
|
||||
|
||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
||||
|
||||
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-nova_api_wsgi.conf)
|
||||
|
||||
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}/"
|
||||
else
|
||||
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-nova_api_wsgi.conf)
|
||||
fi
|
||||
|
||||
healthcheck_curl ${check_url}
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
||||
|
||||
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-metadata_wsgi.conf)
|
||||
healthcheck_curl ${check_url}
|
Loading…
x
Reference in New Issue
Block a user