]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mworker: fix mworker-max-reloads parser
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Sat, 12 Oct 2024 12:02:53 +0000 (14:02 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 21 Oct 2024 08:46:58 +0000 (10:46 +0200)
commitaf1d170122369094a1f3869791fb34fb7286e31e
treeae0a3a89e09f81cf122aab003c03bedb824489e7
parent8a1aabb133d228fd1c86eb4a3d1f91ad9673c31c
BUG/MINOR: mworker: fix mworker-max-reloads parser

Before this patch, when wrong argument was provided in the configuration for
mworker-max-reloads keyword, parser shows these errors below on the stderr:

[WARNING]  (1820317) : config : parsing [haproxy.cfg:154] : (null)parsing [haproxy.cfg:154] : 'mworker-max-reloads' expects an integer argument.

In a case, when by mistake two arguments were provided instead of one, this has
also triggered a buggy error message:

[ALERT]    (1820668) : config : parsing [haproxy.cfg:154] : 'mworker-max-reloads' cannot handle unexpected argument '45'.
[WARNING]  (1820668) : config : parsing [haproxy.cfg:154] : (null)

So, as 'mworker-max-reloads' is parsed in discovery mode by master process
let's align now its parser with all others, which could be called for this
mode. Like this in cases, when there are too many args or argument isn't a
valid integer we return proper error codes to global section parser and
messages are formated properly.

This fix should be backported in all stable versions.
src/mworker.c