Merge "Take WSGIScriptAlias into account in docker healthcheck."
This commit is contained in:
@@ -63,9 +63,13 @@ get_url_from_vhost () {
|
|||||||
server_name=$(awk '/ServerName/ {print $2}' $vhost_file)
|
server_name=$(awk '/ServerName/ {print $2}' $vhost_file)
|
||||||
ssl_enabled=$(awk '/SSLEngine/ {print $2}' $vhost_file)
|
ssl_enabled=$(awk '/SSLEngine/ {print $2}' $vhost_file)
|
||||||
bind_port=$(grep -h "<VirtualHost .*>" $vhost_file | sed 's/<VirtualHost .*:\(.*\)>/\1/')
|
bind_port=$(grep -h "<VirtualHost .*>" $vhost_file | sed 's/<VirtualHost .*:\(.*\)>/\1/')
|
||||||
|
wsgi_alias=$(awk '/WSGIScriptAlias/ {print $2}' $vhost_file)
|
||||||
proto=http
|
proto=http
|
||||||
if [[ $ssl_enabled == "on" ]]; then
|
if [[ $ssl_enabled == "on" ]]; then
|
||||||
proto=https
|
proto=https
|
||||||
fi
|
fi
|
||||||
echo ${proto}://${server_name}:${bind_port}/
|
if [[ $wsgi_alias != "/" ]]; then
|
||||||
|
wsgi_alias="${wsgi_alias}/"
|
||||||
|
fi
|
||||||
|
echo ${proto}://${server_name}:${bind_port}${wsgi_alias}
|
||||||
}
|
}
|
||||||
|
@@ -3,4 +3,4 @@
|
|||||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
||||||
|
|
||||||
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-placement_wsgi.conf)
|
check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-placement_wsgi.conf)
|
||||||
healthcheck_curl ${check_url}/placement/
|
healthcheck_curl ${check_url}
|
||||||
|
Reference in New Issue
Block a user