Skip to content

Commit

Permalink
Change the haproxy reload detection to tolerate routes named localhost
Browse files Browse the repository at this point in the history
This changes the reload-haproxy script to explicitly pass no hostname in the http headers so that if a route is created named 'localhost' the reload does not match that route.

Fixes bug 1542612 (https://bugzilla.redhat.com/show_bug.cgi?id=1542612)
  • Loading branch information
knobunc committed Feb 8, 2018
1 parent 56efdb0 commit 14191df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion images/router/haproxy/reload-haproxy
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function haproxyHealthCheck() {

echo " - Checking ${url} ..."
while true; do
local httpcode=$(curl $timeout_opts -s -o /dev/null -I -w "%{http_code}" ${url})
local httpcode=$(curl $timeout_opts -s -o /dev/null -I -H "Host: " -w "%{http_code}" ${url})

if [ "$httpcode" == "503" ]; then
echo " - Health check ok : $retries retry attempt(s)."
Expand Down

0 comments on commit 14191df

Please sign in to comment.