BUG/MINOR: mworker: section ignored in discovery after a post_section_parser
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 12 Feb 2025 11:09:05 +0000 (12:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 09:34:26 +0000 (10:34 +0100)
commit6de38fd64dade31481d8ee590906228c1f8741f4
tree36a036bfd82a362da8b57f512062e844b81145ff
parent7cdb2bb00af5a44bab775f2a565cfb27682451f9
BUG/MINOR: mworker: section ignored in discovery after a post_section_parser

When a new section is discovered, the post_section_parser of the
previous section is called. However in the new master-worker mode the
discovery mode will skip the post_section_parser. But instead of
trying to parse the current section keyword after that, it would skip
completely the current line.

This is a minor bug since there isn't a lot of section with
post_section_parser, and not a lot of section to parse in discovery
mode.

But this could be reproduced like this:

global
        expose-deprecated-directives

resolvers res
parse-resolv-conf

program foo
        command sleep 10

program bar
       command sleep 10

Ths 'resolvers' section has a post_section_parser which will be ignored
in discovery mode with the consequence of ignoring the first program
section.

This must be backported in 3.1.

(cherry picked from commit 2c270a05f06ff6ea2c23b369692a12a7780291b7)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/cfgparse.c