]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: config: don't emit a warning when global stats is incompletely configured
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Feb 2018 08:55:09 +0000 (09:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Feb 2018 08:55:09 +0000 (09:55 +0100)
commit58aa5ccd7675e5c960b045e96fdf69845d6449b4
tree2ac09b3c06128bbef9b7c07cc3f926f4a5d42123
parentf65f257871907f831558b1fab626d871fd48e984
BUG/MINOR: config: don't emit a warning when global stats is incompletely configured

Martin Brauer reported an unexpected warning when some parts of the
global stats are defined but not the listening address, like below :

  global
    #stats socket run/admin.sock mode 660 level admin
    stats timeout 30s

Then haproxy complains :
  [WARNING] 334/150131 (23086) : config : frontend 'GLOBAL' has no
'bind' directive. Please declare it as a backend if this was intended.

This is because of the check for a bind-less frontend (the global section
creates a frontend for the stats). There's no clean fix for this one, so
here we're simply checking that the frontend is not the global stats one
before emitting the warning.

This patch should be backported to all stable versions.
src/cfgparse.c