]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: config: mark "grace" as deprecated
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 17:07:01 +0000 (19:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 17:07:01 +0000 (19:07 +0200)
This was introduced 15 years ago or so to delay the stopping of some
services so that a monitoring device could detect its port being down
before services were stopped. Since then, clean reloads were implemented
and this doesn't cope well with reload at all, preventing the new process
from seamlessly binding, and forcing processes to coexist with half-baked
configurations.

Now it has become a real problem because there's a significant code
portion in the proxies that is solely dedicated to this obsolete feature,
and dealing with its special cases eases the introduction of bugs in
other places so it's about time that it goes.

We could tentatively schedule its removal for 2.4 with a hard deadline
for 2.5 in any case.

doc/configuration.txt
src/cfgparse-listen.c

index 083f1f60055ee4796b4908c21db4a20e19fab851..ce7000470fec391c61b4442401899fbdec52e615 100644 (file)
@@ -4498,7 +4498,7 @@ fullconn <conns>
   See also : "maxconn", "server"
 
 
-grace <time>
+grace <time> (deprecated)
   Maintain a proxy operational for some time after a soft stop
   May be used in sections :   defaults | frontend | listen | backend
                                  yes   |    yes   |   yes  |   yes
index cda55e658b0f8fb6e495b9b3d413e79c7640b4fc..6f324fafa112cfa51d7030d7b3be1637f5b1d335 100644 (file)
@@ -2602,6 +2602,9 @@ stats_error_parsing:
                curproxy->grace = val;
                if (alertif_too_many_args(1, file, linenum, args, &err_code))
                        goto out;
+
+               ha_warning("parsing [%s:%d]: the '%s' is deprecated and will be removed in a future version.\n",
+                          file, linenum, args[0]);
        }
        else if (!strcmp(args[0], "dispatch")) {  /* dispatch address */
                struct sockaddr_storage *sk;