]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: mworker: depreciate the 'program' section
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 8 Nov 2024 16:06:58 +0000 (17:06 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 8 Nov 2024 16:06:58 +0000 (17:06 +0100)
The program section is unreliable and should not be used, more reliable
alternatives exist outside HAProxy. Let's depreciate the section so we
could remove it completely in 3.3.

doc/configuration.txt
src/mworker-prog.c

index 345edf60b4fd1c4b3ba15e4a049f3bf0d899cd26..3c834eef4f5908f2ef6b6d0f8b1c646a477c764b 100644 (file)
@@ -56,7 +56,7 @@ Summary
 3.4.      Userlists
 3.5.      Peers
 3.6.      Mailers
-3.7.      Programs
+3.7.      Programs (deprecated)
 3.8.      HTTP-errors
 3.9.      Rings
 3.10.     Log forwarding
@@ -4763,8 +4763,14 @@ timeout mail <time>
         timeout mail 20s
         mailer smtp1 192.168.0.1:587
 
-3.7. Programs
--------------
+3.7. Programs (deprecated)
+--------------------------
+
+This section is deprecated and should disappear with HAProxy 3.3. The section
+could be replaced easily by separated process managers. Systemd unit files or
+sysvinit scripts could replace this section as they are more reliable. In docker
+environments, some alternatives can also be found such as s6 or supervisord.
+
 In master-worker mode, it is possible to launch external binaries with the
 master, these processes are called programs. These programs are launched and
 managed the same way as the workers.
index 8e6bb3e7696a99677c0a670a2f439d39f5228b8b..88ff1fc9f8ccc73bd86b70033f9f5046731a19b5 100644 (file)
@@ -194,6 +194,10 @@ int cfg_parse_program(const char *file, int linenum, char **args, int kwm)
                        goto error;
                }
 
+               ha_warning("parsing [%s:%d]: The '%s' section is deprecated and will eventually be removed, please consider "
+                          "using a process manager instead, such as sysvinit, systemd, supervisord or s6\n",
+                          file, linenum, args[0]);
+
                LIST_APPEND(&proc_list, &ext_child->list);
 
        } else if (strcmp(args[0], "command") == 0) {