Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.

Commit 89fc145

Browse files
committed
haproxy: -conf-OK now uses the return code
Instead of checking the string "Configuration file is valid", uses the return code of HAProxy. This is related to a change in HAProxy which disables the output of `haproxy -c` when the configuration is valid.
1 parent 65c108f commit 89fc145

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/vtc_haproxy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#define HAPROXY_OPT_DAEMON "-D"
5656
#define HAPROXY_SIGNAL SIGINT
5757
#define HAPROXY_EXPECT_EXIT (128 + HAPROXY_SIGNAL)
58-
#define HAPROXY_GOOD_CONF "Configuration file is valid"
5958

6059
struct envar {
6160
VTAILQ_ENTRY(envar) list;
@@ -1077,8 +1076,9 @@ cmd_haproxy(CMD_ARGS)
10771076
if (!strcmp(*av, "-conf-OK")) {
10781077
AN(av[1]);
10791078
haproxy_store_conf(h, av[1], 0);
1079+
h->expect_exit = 0;
1080+
haproxy_check_conf(h, "");
10801081
av++;
1081-
haproxy_check_conf(h, HAPROXY_GOOD_CONF);
10821082
continue;
10831083
}
10841084
if (!strcmp(*av, "-conf-BAD")) {

0 commit comments

Comments
 (0)