]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cfgparse: suggest correct spelling for unknown words in global section
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 08:30:14 +0000 (09:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 13:13:21 +0000 (14:13 +0100)
commita0e8eb8caaf1632500bab0dfe0c017540d0d71cb
tree12ad7b3da2424e3d8e27f9ddd8cceb9f68f1affd
parentc0ff6794814943e5483fdcea51ee8b806fd94c81
MINOR: cfgparse: suggest correct spelling for unknown words in global section

The global section also knows a large number of keywords that are not
referenced in any list, so this needed them to be specifically listed.
It becomes particularly handy now because some tunables are never easy
to remember, but now it works remarkably well:

  $ printf "global\nsched.queue_depth\n" | ./haproxy -c -f /dev/stdin
  [NOTICE] 070/093007 (23457) : haproxy version is 2.4-dev11-dd8ee5-24
  [NOTICE] 070/093007 (23457) : path to executable is ./haproxy
  [ALERT] 070/093007 (23457) : parsing [/dev/stdin:2] : unknown keyword 'sched.queue_depth' in 'global' section; did you mean 'tune.runqueue-depth' maybe ?
  [ALERT] 070/093007 (23457) : Error(s) found in configuration file : /dev/stdin
  [ALERT] 070/093007 (23457) : Fatal errors found in configuration.
src/cfgparse-global.c