Commit Graph

5 Commits

Author SHA1 Message Date
William Lallemand
e826bc3dfa MEDIUM: systemd: be more verbose about the reload
When the `haproxy -c` check during the reload fails, no error is output
in the logs, this can be quite bothersome to understand what's going on.

This patch removes the -q option on the check so we can see the error
with `journalctl -u haproxy` or `systemctl status haproxy`

This will change the behavior when the check works, and will display
"Configuration file is valid"

Note that in some case this test could be completely removed, because
the master process loads the configuration itself and is able to keep
the previous workers running when the reload failed. This is interesting
to disable the test when there are a lot of certificates of files to
load, to divide the reload time by 2.

No need to backport.
2023-10-31 18:59:29 +01:00
William Lallemand
fff1e583aa MINOR: systemd: remove the ExecStartPre line in the unit file
The ExecStartPre line was introduced a long time ago in the systemd unit
file, at the time of systemd wrapper. With the haproxy master worker
mode, this line is now useless, since starting haproxy itself will check
the configuration.

However this does not concern the check in the ExecReload which is still
needed to return a reload status to HAProxy.

It probably shouldn't be backported.
2021-08-20 23:36:45 +02:00
William Lallemand
6f58c13797 BUG/MINOR: systemd: ExecStartPre must use -Ws
This line should disappear in a future version but we should still fix
ExecStartPre with -Ws like we've done in 9def142.

It's a complementary fix that must be backported with 9def142
("BUG/MINOR: systemd: must check the configuration using -Ws").
2021-08-20 23:29:53 +02:00
William Lallemand
9def1425ce BUG/MINOR: systemd: must check the configuration using -Ws
When doing a reload with a configuration which requires the
master-worker mode, the configuration check will fail because the check
is not done with -W/-Ws.

Example:
	wla@kikyo:~/haproxy$ ./haproxy -Ws -c -f haproxy.cfg
	Configuration file is valid
	wla@kikyo:~/haproxy$ ./haproxy -c -f haproxy.cfg
	[NOTICE]   (13153) : haproxy version is 2.5-dev2-4567b3-16
	[NOTICE]   (13153) : path to executable is ./haproxy
	[ALERT]    (13153) : config : Can't use a 'program' section without master worker mode.
	[ALERT]    (13153) : config : Fatal errors found in configuration.

This patch fixes the issue by adding -Ws on the check command line.

Must be backported in all stable branches. (The file was previously in
contrib/systemd/haproxy.service.in).
2021-07-26 11:03:54 +02:00
Willy Tarreau
233e868895 CONTRIB: move some admin-related sub-projects to admin/
The following components were moved to admin/ because they're generally
used in field by admins:

  iprange/  netsnmp-perl/  selinux/  systemd/  wireshark-dissectors/
  syntax-highlight/ release-estimator/
2021-04-02 17:48:42 +02:00