1760afaacc
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
15 lines
472 B
Bash
Executable File
15 lines
472 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. ${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}/"
|
|
else
|
|
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-nova_api_wsgi.conf)
|
|
fi
|
|
|
|
healthcheck_curl ${check_url}
|