]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: hlua: ignore "tune.lua.bool-sample-conversion" if set after "lua-load"
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 2 May 2025 11:56:08 +0000 (13:56 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 2 May 2025 12:38:37 +0000 (14:38 +0200)
commit7a8d1a312258a57624bf7963841bbe27c9588ef5
treeded6df37da4b313e666ca53a5fca24e24c3bfb99
parent6051a6e485928b3f6d47f36636ade6021d3caa84
MINOR: hlua: ignore "tune.lua.bool-sample-conversion" if set after "lua-load"

tune.lua.bool-sample-conversion must be set before any lua-load or
lua-load-per-thread is used for it to be considered. Indeed, lua-load
directives are parsed on the fly and will cause some parts of the scripts
to be executed during init already (script body/init contexts).

As such, we cannot afford to have "tune.lua.bool-sample-conversion" set
after some Lua code was loaded, because it would mean that the setting
would be handled differently for Lua's code executed during or after
config parsing.

To avoid ambiguities, the documentation now states that the setting must
be set before any lua-load(-per-thread) directive, and if the setting
is met after some Lua was already loaded, the directive is ignored and
a warning informs about that.

It should fix GH #2957

It may be backported with 29b6d8af16 ("MINOR: hlua: rename
"tune.lua.preserve-smp-bool" to "tune.lua.bool-sample-conversion"")
doc/configuration.txt
src/hlua.c