]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: sample: add missing use_backend/use-server contexts in smp_resolve_args
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Apr 2022 06:15:46 +0000 (08:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Apr 2022 14:09:26 +0000 (16:09 +0200)
commit1a8636d0179904743a118d8938d2c459d9617111
tree22c33f9d98739bc390468113564fabfe3d424357
parent16daaf319c287b02e8e60e4616685427c33f2a06
BUG/MINOR: sample: add missing use_backend/use-server contexts in smp_resolve_args

The use_backend and use-server contexts were not enumerated in
smp_resolve_args, and while use-server doesn't currently take an
expression, at least use_backend supports that, and both entries ought
to be listed for completeness. Now an error in a use_backend rule
becomes more precise, from:

  [ALERT]    (12373) : config : parsing [use-srv.cfg:33]: unable to find
                       backend 'foo' referenced in arg 1 of sample fetch
                       keyword 'nbsrv' in proxy 'echo'.
to:

  [ALERT]    (12307) : config : parsing [use-srv.cfg:33]: unable to find
                       backend 'foo' referenced in arg 1 of sample fetch
                       keyword 'nbsrv' in use_backend expression in proxy
                       'echo'.

This may be backported though this is totally harmless.
src/sample.c