From 10cae2e135e0e93e08c887ebbdb7a065c67839f3 Mon Sep 17 00:00:00 2001 From: HAProxy Community Date: Sat, 21 Dec 2024 00:50:21 +0000 Subject: [PATCH] Update docs for dev --- docs/dev/configuration.html | 49 +++++++++++++++++++------------------ docs/dev/intro.html | 8 +++--- docs/dev/management.html | 8 +++--- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/docs/dev/configuration.html b/docs/dev/configuration.html index eb04b4a..5616172 100644 --- a/docs/dev/configuration.html +++ b/docs/dev/configuration.html @@ -2,7 +2,7 @@ - HAProxy version 3.2-dev1-74 - Configuration Manual + HAProxy version 3.2-dev1-75 - Configuration Manual @@ -4125,6 +4125,8 @@ tune.listener.multi-queue + tune.lua.bool-sample-conversion + tune.lua.burst-timeout tune.lua.forced-yield @@ -4139,8 +4141,6 @@ tune.lua.session-timeout - tune.lua.smp-preserve-bool - tune.lua.task-timeout tune.max-checks-per-thread @@ -4428,7 +4428,7 @@ You can use left and right arrow keys to navigate between chapters.

- Converted with haproxy-dconv v0.4.2-15 on 2024/12/19 + Converted with haproxy-dconv v0.4.2-15 on 2024/12/20

@@ -4439,7 +4439,7 @@

Configuration Manual

-

version 3.2-dev1-74

+

version 3.2-dev1-75

2024/12/11
@@ -7185,6 +7185,7 @@

2.9.< - tune.http.maxhdr - tune.idle-pool.shared - tune.idletimer + - tune.lua.bool-sample-conversion - tune.lua.burst-timeout - tune.lua.forced-yield - tune.lua.log.loggers @@ -7192,7 +7193,6 @@

2.9.< - tune.lua.maxmem - tune.lua.service-timeout - tune.lua.session-timeout - - tune.lua.smp-preserve-bool - tune.lua.task-timeout - tune.max-checks-per-thread - tune.maxaccept @@ -9052,6 +9052,24 @@

3.2.< using "off" for troubleshooting, or for situations where connections are short-lived and it is estimated that the operating system already provides a good enough distribution. The default is "on". +
tune.lua.bool-sample-conversion { normal | pre-3.1-bug }
Explicitly tell haproxy how haproxy sample objects should be handled when
+pushed to Lua. Indeed, when leveraging native converters, sample fetches or
+variables from Lua script (to name a few), haproxy converts the internal
+smp type to equivalent Lua type. Because of historical implementation, there
+is an ambiguity around boolean handling: when doing Lua -> haproxy smp
+conversion, booleans are properly preserved, but when doing haproxy
+smp -> Lua conversion, booleans were converted to integers by mistake. This
+means that a sample fetch or converter returning a boolean would return an
+integer 0 or 1 when leveraged from Lua. Unfortunately, in Lua, booleans and
+integers are not interchangeable. Thus, to avoid ambiguities,
+"tune.lua.bool-sample-conversion" must explicitly be set to either "normal"
+(which means dropping the historical behavior for better consistency) or
+"pre-3.1-bug" (enforce historical behavior to prevent existing script logic
+from misbehaving). If the option is not set explicitly and a Lua script is
+loaded from the configuration, haproxy will emit a warning, and the option
+will implicitly default to "pre-3.1-bug" to match with the historical
+behavior. It is recommended to set this option to "normal" after ensuring
+that in-use Lua scripts are properly handling bool haproxy samples as booleans.
 
The "burst" execution timeout applies to any Lua handler. If the handler
 fails to finish or yield before timeout is reached, it will be aborted to
 prevent thread contention, to prevent traffic from not being served for too
@@ -9146,23 +9164,6 @@ 

3.2.< dedicated to the tasks. By default, this timeout isn't set because a task may remain alive during of the lifetime of HAProxy. For example, a task used to check servers. -

Explicitly tell haproxy how haproxy sample objects should be handled when
-pushed to Lua. Indeed, when using native converters or sample fetches from
-Lua script, haproxy converts the smp type to equivalent Lua type. Because
-of historical implementation, there is an ambiguity around boolean
-handling: when doing Lua -> haproxy smp conversion, booleans are properly
-preserved, but when doing haproxy smp -> Lua conversion, booleans were
-converted to integers. This means that a sample fetch or converter returning
-a boolean would return an integer 0 or 1 when leveraged from Lua.
-Unfortunately, in Lua, booleans and integers are not interchangeable. Thus,
-to avoid ambiguities, "tune.lua.smp-preserve-bool" must explicitly be set to
-either "on" (which means dropping the historical behavior for better
-consistency) or "off" (enforce historical behavior to prevent existing script
-logic from misbehaving). If the option is not set explicitly and a Lua script
-is loaded from the configuration, haproxy will emit a warning, and the option
-will implicitly default to "off" to match with the historical behavior. When
-possible, it is recommended to set this option to "on" after ensuring that
-in-use Lua scripts are properly handling bool haproxy samples as booleans.
 
Sets the number of active checks per thread above which a thread will
 actively try to search a less loaded thread to run the health check, or
 queue it until the number of active checks running on it diminishes. The
@@ -31758,7 +31759,7 @@ 

11

- HAProxy 3.2-dev1-74 – Configuration Manual
+ HAProxy 3.2-dev1-75 – Configuration Manual
, 2024/12/11

diff --git a/docs/dev/intro.html b/docs/dev/intro.html index 940c7d4..8175cbd 100644 --- a/docs/dev/intro.html +++ b/docs/dev/intro.html @@ -2,7 +2,7 @@ - HAProxy version 3.2-dev1-74 - Starter Guide + HAProxy version 3.2-dev1-75 - Starter Guide @@ -484,7 +484,7 @@ You can use left and right arrow keys to navigate between chapters.

- Converted with haproxy-dconv v0.4.2-15 on 2024/12/19 + Converted with haproxy-dconv v0.4.2-15 on 2024/12/20

@@ -495,7 +495,7 @@

Starter Guide

-

version 3.2-dev1-74

+

version 3.2-dev1-75


@@ -2515,7 +2515,7 @@

4.4.<

- HAProxy 3.2-dev1-74 – Starter Guide
+ HAProxy 3.2-dev1-75 – Starter Guide
,

diff --git a/docs/dev/management.html b/docs/dev/management.html index c08f471..da69f67 100644 --- a/docs/dev/management.html +++ b/docs/dev/management.html @@ -2,7 +2,7 @@ - HAProxy version 3.2-dev1-74 - Management Guide + HAProxy version 3.2-dev1-75 - Management Guide @@ -654,7 +654,7 @@ You can use left and right arrow keys to navigate between chapters.

- Converted with haproxy-dconv v0.4.2-15 on 2024/12/19 + Converted with haproxy-dconv v0.4.2-15 on 2024/12/20

@@ -665,7 +665,7 @@

Management Guide

-

version 3.2-dev1-74

+

version 3.2-dev1-75


@@ -5446,7 +5446,7 @@

13

- HAProxy 3.2-dev1-74 – Management Guide
+ HAProxy 3.2-dev1-75 – Management Guide
,