From: Willy Tarreau Date: Fri, 15 Jul 2022 15:16:01 +0000 (+0200) Subject: MEDIUM: config: remove the "process" keyword on "bind" lines X-Git-Tag: v2.7-dev2~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acd644197f4e4baa5fde55a66c2adb49fff46c88;p=thirdparty%2Fhaproxy.git MEDIUM: config: remove the "process" keyword on "bind" lines It was deprecated, marked for removal in 2.7 and was already emitting a warning, let's get rid of it. Note that we've kept the keyword detection to suggest to use "thread" instead. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 900fd8868d..59884386b0 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -14416,26 +14416,6 @@ prefer-client-ciphers (without setting this option), if a ChaCha20-Poly1305 cipher is at the top of the client cipher list. -process [/] - This restricts the list of threads on which this listener is allowed to run. - It does not enforce any of them but eliminates those which do not match. Note - that only process number 1 is permitted. If a thread set is specified, it - limits the threads allowed to process incoming connections for this listener. - For the unlikely case where several ranges are needed, this directive may be - repeated. and must use the format - - all | odd | even | number[-[number]] - - Ranges can be partially defined. The higher bound can be omitted. In such a - case, it is replaced by the corresponding maximum value. The main purpose is - to have multiple bind lines sharing the same IP:port but not the same thread - in a listener, so that the system can distribute the incoming connections - into multiple queues, bypassing haproxy's internal queue load balancing. - Currently Linux 3.9 and above is known for supporting this. - - This directive is deprecated in favor of the more suited "thread" directive - below, and will be removed in 2.7. - proto Forces the multiplexer's protocol to use for the incoming connections. It must be compatible with the mode of the frontend (TCP or HTTP). It must also diff --git a/src/listener.c b/src/listener.c index 8a033fdc9e..59c31cf03f 100644 --- a/src/listener.c +++ b/src/listener.c @@ -1734,31 +1734,8 @@ static int bind_parse_nice(char **args, int cur_arg, struct proxy *px, struct bi /* parse the "process" bind keyword */ static int bind_parse_process(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err) { - char *slash; - unsigned long proc = 0, thread = 0; - - if ((slash = strchr(args[cur_arg + 1], '/')) != NULL) - *slash = 0; - - if (parse_process_number(args[cur_arg + 1], &proc, 1, NULL, err)) { - memprintf(err, "'%s' : %s", args[cur_arg], *err); - return ERR_ALERT | ERR_FATAL; - } - - if (slash) { - if (parse_process_number(slash+1, &thread, MAX_THREADS, NULL, err)) { - memprintf(err, "'%s' : %s", args[cur_arg], *err); - return ERR_ALERT | ERR_FATAL; - } - *slash = '/'; - } - - conf->bind_thread |= thread; - - memprintf(err, "'process %s' on 'bind' lines is deprecated and will be removed in 2.7.", args[cur_arg+1]); - if (slash) - memprintf(err, "%s Please use 'thread %s' instead.", *err, slash + 1); - return ERR_WARN; + memprintf(err, "'process %s' on 'bind' lines is not supported anymore, please use 'thread' instead.", args[cur_arg+1]); + return ERR_ALERT | ERR_FATAL; } /* parse the "proto" bind keyword */