Skip to content

Commit 581c8a2

Browse files
committed
MEDIUM: mworker: depreciate the 'program' section
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.
1 parent 0434e87 commit 581c8a2

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

doc/configuration.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Summary
5656
3.4. Userlists
5757
3.5. Peers
5858
3.6. Mailers
59-
3.7. Programs
59+
3.7. Programs (deprecated)
6060
3.8. HTTP-errors
6161
3.9. Rings
6262
3.10. Log forwarding
@@ -4763,8 +4763,14 @@ timeout mail <time>
47634763
timeout mail 20s
47644764
mailer smtp1 192.168.0.1:587
47654765

4766-
3.7. Programs
4767-
-------------
4766+
3.7. Programs (deprecated)
4767+
--------------------------
4768+
4769+
This section is deprecated and should disappear with HAProxy 3.3. The section
4770+
could be replaced easily by separated process managers. Systemd unit files or
4771+
sysvinit scripts could replace this section as they are more reliable. In docker
4772+
environments, some alternatives can also be found such as s6 or supervisord.
4773+
47684774
In master-worker mode, it is possible to launch external binaries with the
47694775
master, these processes are called programs. These programs are launched and
47704776
managed the same way as the workers.

src/mworker-prog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ int cfg_parse_program(const char *file, int linenum, char **args, int kwm)
194194
goto error;
195195
}
196196

197+
ha_warning("parsing [%s:%d]: The '%s' section is deprecated and will eventually be removed, please consider "
198+
"using a process manager instead, such as sysvinit, systemd, supervisord or s6\n",
199+
file, linenum, args[0]);
200+
197201
LIST_APPEND(&proc_list, &ext_child->list);
198202

199203
} else if (strcmp(args[0], "command") == 0) {

0 commit comments

Comments
 (0)