Hi Paul,
I add Emeric to the thread.
Le 23/12/2017 à 02:41, Paul Lockaby a écrit :
Hello, I recently upgraded to 1.8.1 and noticed a pretty big functional
difference that I can't attribute to any listed change in the changelog. Here
is my configuration:
global
log /dev/log local0
user nobody
group nobody
defaults
# set timeout to ten minutes
timeout connect 5000ms
timeout client 600000ms
timeout server 600000ms
option httplog
option forwardfor
option http-server-close
option contstats
frontend unsecured
bind *:80
mode http
log global
redirect scheme https code 301 if !{ ssl_fc }
frontend secured
bind *:443 ssl crt /usr/local/ssl/certs/example.com.pem
mode http
log global
default_backend example-http
backend example-http
mode http
log global
balance source
hash-type consistent
option httpchk GET /haproxy/alive.txt
http-check disable-on-404
server example01 example01.com:8443 check ssl ca-file
/usr/local/ssl/certs/cacerts.cert
server example02 example02.com:8443 check ssl ca-file
/usr/local/ssl/certs/cacerts.cert
server example03 example03.com:8443 check ssl ca-file
/usr/local/ssl/certs/cacerts.cert
From 1.7 to 1.8 the functionality in "http-check disable-on-404" seems to have
changed.
On 1.7.9, this configuration would cause a backend server to become unavailable if the path
"/haproxy/alive.txt" returned a 404. The host would be marked "active or backup SOFT
STOPPED for maintenance" and it would no longer be given new requests.
On 1.8.1, when "/haproxy/alive.txt" returns a 404 the host STAYS in the rotation and continues to
receive new requests! I am able to work around it by removing "http-check disable-on-404" and then
when the file disappears the host just goes to "active or backup DOWN". But the change from 1.7 to
1.8 was jarring and surprising and I did not see anything in the changelog indicating that this is supposed
to have changed like this. Was I doing it wrong from the beginning?
It looks to be a code regression.
Emeric, can you have a look at commit 5a1335110c ? It seems there was an
unwanted change in the function call : srv_set_stopping() was replaced
by srv_set_running()
[...]
/* Marks the check <check> as valid and tries to set its server into
stopping mode
@@ -406,7 +371,7 @@ static void check_notify_stopping(struct check *check)
if ((s->agent.state & CHK_ST_ENABLED) && (s->agent.health <
s->agent.rise))
return;
- srv_set_stopping(s, (!s->track && !(s->proxy->options2 &
PR_O2_LOGHCHKS)) ? check_reason_string(check) : NULL);
+ srv_set_running(s, NULL, (!s->track && !(s->proxy->options2 &
PR_O2_LOGHCHKS)) ? check : NULL);
}
[...]
Thanks ;-)
--
Cyril Bonté