]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: config: remove deprecated "bind-process" directives from frontends
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 15:14:40 +0000 (17:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 17:41:26 +0000 (19:41 +0200)
This was already causing a deprecation warning and was marked for removal
in 2.7, now it happens. An error message indicates this doesn't exist
anymore.

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

index cd6774906181aa1361c14172300d5d80686c77c3..900fd8868dd11649c431c85bcbb868b2c3feab54 100644 (file)
@@ -1224,7 +1224,7 @@ cpu-map [auto:]<process-set>[/<thread-set>] <cpu-set>...
   ignored. It is possible to specify a range with two such number delimited by
   a dash ('-'). It also is possible to specify all thraeds at once using
   "all", only odd numbers using "odd" or even numbers using "even", just like
-  with the "bind-process" directive. The second and forthcoming arguments are
+  with the bind "thread" directive. The second and forthcoming arguments are
   CPU sets. Each CPU set is either a unique number starting at 0 for the first
   CPU or a range with two such numbers delimited by a dash ('-'). Outside of
   Linux and BSDs, there may be a limitation on the maximum CPU index to either
@@ -1909,11 +1909,6 @@ resetenv [<name> ...]
   next line in the configuration file sees the new environment. See also
   "setenv", "presetenv", and "unsetenv".
 
-stats bind-process [ all | odd | even | <process_num>[-[process_num>]] ] ...
-  Deprecated. Before threads were supported, this was used to force some stats
-  instances on certain processes only. The default and only accepted value is
-  "1" (along with "all" and "odd" which alias it). Do not use this setting.
-
 server-state-base <directory>
   Specifies the directory prefix to be prepended in front of all servers state
   file names which do not start with a '/'. See also "server-state-file",
@@ -3903,7 +3898,6 @@ acl                                       X (!)      X         X         X
 backlog                                   X          X         X         -
 balance                                   X          -         X         X
 bind                                      -          X         X         -
-bind-process                              X          X         X         X
 capture cookie                            -          X         X         -
 capture request header                    -          X         X         -
 capture response header                   -          X         X         -
@@ -4527,20 +4521,6 @@ bind /<path> [, ...] [param*]
              documentation, and section 5 about bind options.
 
 
-bind-process [ all | odd | even | <process_num>[-[<process_num>]] ] ...
-  May be used in sections :   defaults | frontend | listen | backend
-                                 yes   |    yes   |   yes  |   yes
-
-  Deprecated. Before threads were supported, this was used to force some
-  frontends on certain processes only, or to adjust backends so that they
-  could match the frontends that used them. The default and only accepted
-  value is "1" (along with "all" and "odd" which alias it). Do not use this
-  setting. Threads can still be bound per-socket using the "process" bind
-  keyword.
-
-  See also : "process" in section 5.1.
-
-
 capture cookie <name> len <length>
   Capture and log a cookie in the request and in the response.
   May be used in sections :   defaults | frontend | listen | backend
index c4b33f75e22d854bc724ab7354cefebf4ddf38b5..258a3581ca63f62b7c1550ca1a4feaeffeadf2e0 100644 (file)
@@ -41,7 +41,7 @@ static const char *common_kw_list[] = {
        "listen", "frontend", "backend", "defaults", "server",
        "default-server", "server-template", "bind", "monitor-net",
        "monitor-uri", "mode", "id", "description", "disabled", "enabled",
-       "bind-process", "acl", "dynamic-cookie-key", "cookie", "email-alert",
+       "acl", "dynamic-cookie-key", "cookie", "email-alert",
        "persist", "appsession", "load-server-state-from-file",
        "server-state-file-name", "max-session-srv-conns", "capture",
        "retries", "http-request", "http-response", "http-after-response",
@@ -636,24 +636,8 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
                curproxy->flags &= ~PR_FL_DISABLED;
        }
        else if (strcmp(args[0], "bind-process") == 0) {  /* enable this proxy only on some processes */
-               int cur_arg = 1;
-               unsigned long set = 0;
-
-               while (*args[cur_arg]) {
-                       if (strcmp(args[cur_arg], "all") == 0) {
-                               set = 0;
-                               break;
-                       }
-                       if (parse_process_number(args[cur_arg], &set, 1, NULL, &errmsg)) {
-                               ha_alert("parsing [%s:%d] : %s : %s\n", file, linenum, args[0], errmsg);
-                               err_code |= ERR_ALERT | ERR_FATAL;
-                               goto out;
-                       }
-                       cur_arg++;
-               }
-               ha_warning("parsing [%s:%d]: '%s' has no effect, is deprecated, and will be removed in version 2.7.\n",
-                          file, linenum, args[0]);
-               err_code |= ERR_WARN;
+               ha_alert("parsing [%s:%d]: '%s' is not supported anymore.\n", file, linenum, args[0]);
+               err_code |= ERR_ALERT | ERR_FATAL;
        }
        else if (strcmp(args[0], "acl") == 0) {  /* add an ACL */
                if ((curproxy->cap & PR_CAP_DEF) && strlen(curproxy->id) == 0) {
index 9630d5a1cd58397e472a3e7595b68fc36506b079..485c096622d7141ad6a9b6de594b41443a23b4a8 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -603,28 +603,9 @@ static int cli_parse_global(char **args, int section_type, struct proxy *curpx,
                }
                global.cli_fe->maxconn = maxconn;
        }
-       else if (strcmp(args[1], "bind-process") == 0) {  /* enable the socket only on some processes */
-               int cur_arg = 2;
-               unsigned long set = 0;
-
-               if (!global.cli_fe) {
-                       if ((global.cli_fe = cli_alloc_fe("GLOBAL", file, line)) == NULL) {
-                               memprintf(err, "'%s %s' : out of memory trying to allocate a frontend", args[0], args[1]);
-                               return -1;
-                       }
-               }
-
-               while (*args[cur_arg]) {
-                       if (strcmp(args[cur_arg], "all") == 0) {
-                               set = 0;
-                               break;
-                       }
-                       if (parse_process_number(args[cur_arg], &set, 1, NULL, err)) {
-                               memprintf(err, "'%s %s' : %s", args[0], args[1], *err);
-                               return -1;
-                       }
-                       cur_arg++;
-               }
+       else if (strcmp(args[1], "bind-process") == 0) {
+               memprintf(err, "'%s' is not supported anymore.", args[0]);
+               return -1;
        }
        else {
                memprintf(err, "'%s' only supports 'socket', 'maxconn', 'bind-process' and 'timeout' (got '%s')", args[0], args[1]);