IPv6 healthcheck fixes for Glance/Swift

Add some checks and fixes for IPv6 bracket URLs for the
Glance and Swift healthchecks. Also, added the -g option
to our healthcheck command to disable the globing parser
(which is also required)

Change-Id: If6a1ee5a138d4c96a4ee01681f4189d96073efad
Closes-bug: 1735923
This commit is contained in:
Dan Prince 2017-12-02 10:10:22 -05:00
parent 4dd080d365
commit 42ecd7d376
6 changed files with 21 additions and 2 deletions

View File

@ -3,7 +3,7 @@
: ${HEALTHCHECK_CURL_WRITE_OUT:='\n%{http_code} %{remote_ip}:%{remote_port} %{time_total} seconds\n'}
healthcheck_curl () {
curl -q --fail \
curl -g -q --fail \
--max-time "${HEALTHCHECK_CURL_MAX_TIME}" \
--user-agent "${HEALTHCHECK_CURL_USER_AGENT}" \
--write-out "${HEALTHCHECK_CURL_WRITE_OUT}" \

View File

@ -4,6 +4,9 @@
bind_host=$(get_config_val /etc/glance/glance-api.conf DEFAULT bind_host 127.0.0.1)
bind_port=$(get_config_val /etc/glance/glance-api.conf DEFAULT bind_port 9292)
# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
bind_host="[${bind_host}]"
fi
# glance-api is still eventlet
healthcheck_curl http://${bind_host}:${bind_port}/

View File

@ -12,4 +12,8 @@ fi
# swift-account-server is still eventlet
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
bind_port=$(get_config_val $conf DEFAULT bind_port 6002)
# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
bind_host="[${bind_host}]"
fi
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck

View File

@ -12,4 +12,8 @@ fi
# swift-container-server is still eventlet
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
bind_port=$(get_config_val $conf DEFAULT bind_port 6001)
# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
bind_host="[${bind_host}]"
fi
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck

View File

@ -12,4 +12,8 @@ fi
# swift-object-server is still eventlet
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
bind_port=$(get_config_val $conf DEFAULT bind_port 6000)
# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
bind_host="[${bind_host}]"
fi
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck

View File

@ -12,4 +12,8 @@ fi
# swift-proxy is still eventlet
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
bind_port=$(get_config_val $conf DEFAULT bind_port 8080)
# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
bind_host="[${bind_host}]"
fi
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck