Merge "Take WSGIScriptAlias into account in docker healthcheck."

This commit is contained in:
Zuul 2018-07-23 11:26:21 +00:00 committed by Gerrit Code Review
commit 38aaf7819e
2 changed files with 6 additions and 2 deletions

View File

@ -63,9 +63,13 @@ get_url_from_vhost () {
server_name=$(awk '/ServerName/ {print $2}' $vhost_file)
ssl_enabled=$(awk '/SSLEngine/ {print $2}' $vhost_file)
bind_port=$(grep -h "<VirtualHost .*>" $vhost_file | sed 's/<VirtualHost .*:\(.*\)>/\1/')
wsgi_alias=$(awk '/WSGIScriptAlias/ {print $2}' $vhost_file)
proto=http
if [[ $ssl_enabled == "on" ]]; then
proto=https
fi
echo ${proto}://${server_name}:${bind_port}/
if [[ $wsgi_alias != "/" ]]; then
wsgi_alias="${wsgi_alias}/"
fi
echo ${proto}://${server_name}:${bind_port}${wsgi_alias}
}

View File

@ -3,4 +3,4 @@
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-placement_wsgi.conf)
healthcheck_curl ${check_url}/placement/
healthcheck_curl ${check_url}