]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: otel: removed insecure-fork-wanted requirement
authorMiroslav Zagorac <mzagorac@haproxy.com>
Thu, 16 Apr 2026 00:03:08 +0000 (02:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Apr 2026 13:28:05 +0000 (15:28 +0200)
Removed the insecure-fork-wanted runtime check from the OTel filter parser
and all related mentions from documentation and test configuration.

The OpenTelemetry C wrapper library can now explicitly start all necessary
OTel threads immediately after configuration parsing, so it is no longer
affected by the HAProxy thread/process creation restriction and the
insecure-fork-wanted option is no longer needed.

addons/otel/README
addons/otel/README-configuration
addons/otel/README.md
addons/otel/src/parser.c
addons/otel/test/haproxy-common.cfg

index 74722e8c012c98b9fe70ec27d142924c777bd5d6..f74cd40f586a8d9d9c10d66f09dab3ea8b3f1ebc 100644 (file)
@@ -194,16 +194,6 @@ the error status.
 4. OTel configuration
 ----------------------
 
-In order for the OTel filter to be used, the 'insecure-fork-wanted' keyword
-must be set in the HAProxy 'global' section.  This is required because the
-OpenTelemetry C++ SDK creates background threads for data export and batch
-processing.  HAProxy will refuse to load the configuration if this keyword
-is missing.
-
-  global
-      insecure-fork-wanted
-      ...
-
 The OTel filter must also be included in the HAProxy configuration, in the
 proxy section (frontend / listen / backend):
 
index 28f47fd62a001e2a4534112a38d5abc5d2be7fc7..c9c9d1edc8728ffc350446d3a6e97b545e69354e 100644 (file)
@@ -54,15 +54,6 @@ the OTel configuration file using the 'config' keyword inside the
 2. HAProxy filter declaration
 ------------------------------
 
-The OTel filter requires the 'insecure-fork-wanted' keyword in the HAProxy
-'global' section.  This is necessary because the OpenTelemetry C++ SDK creates
-background threads for data export and batch processing.  HAProxy will refuse
-to load the configuration if this keyword is missing.
-
-  global
-      insecure-fork-wanted
-      ...
-
 The filter is activated by adding a filter directive in the HAProxy
 configuration, in a proxy section (frontend / listen / backend):
 
index 07ea7180bc0fe06872e0495efd8f3fb059fe65f6..dcc8b26b3e42bb02e3791e4e71b9eaced0e20ccb 100644 (file)
@@ -108,17 +108,6 @@ The filter uses a two-file configuration model:
 
 #### Activating the filter
 
-The OTel filter requires the `insecure-fork-wanted` keyword in the HAProxy
-`global` section.  This is necessary because the OpenTelemetry C++ SDK creates
-background threads for data export and batch processing.  HAProxy will refuse
-to load the configuration if this keyword is missing.
-
-```
-global
-    insecure-fork-wanted
-    ...
-```
-
 Add the filter to a HAProxy proxy section (frontend/listen/backend):
 
 ```
index 55fe6cb36e351d9c7a4d4765846d753ce433c61f..d34fb11bf8c83e5b0c8f8bc656d49ce3a7c5cf23 100644 (file)
@@ -1720,9 +1720,8 @@ static int flt_otel_parse_cfg(struct flt_otel_conf *conf, const char *flt_name,
  *
  * DESCRIPTION
  *   Main filter parser entry point, registered for the "otel" filter keyword.
- *   Verifies that insecure-fork-wanted is enabled, then parses the filter ID
- *   and configuration file path from the HAProxy configuration line.  If no
- *   filter ID is specified, the default ID is used.
+ *   Parses the filter ID and configuration file path from the HAProxy
+ *   configuration line.  If no filter ID is specified, the default ID is used.
  *
  * RETURN VALUE
  *   Returns ERR_NONE (== 0) in case of success,
@@ -1735,12 +1734,6 @@ static int flt_otel_parse(char **args, int *cur_arg, struct proxy *px, struct fl
 
        OTELC_FUNC("%p, %p, %p, %p, %p:%p, %p", args, cur_arg, px, fconf, OTELC_DPTR_ARGS(err), private);
 
-       if (!(global.tune.options & GTUNE_INSECURE_FORK)) {
-               FLT_OTEL_PARSE_ERR(err, "The 'insecure-fork-wanted' option must be enabled in the HAProxy configuration because the OpenTelemetry filter cannot work properly if the creation of threads is forbidden.");
-
-               OTELC_RETURN_INT(retval);
-       }
-
        OTELC_DBG_IFDEF(otelc_dbg_level = FLT_OTEL_DEBUG_LEVEL, );
 
 #ifdef OTELC_DBG_MEM
index d66d73429dc0f0c45964a646843735d664b78357..124a025ffdd13f1c775c2e2682b422cc6e13a045 100644 (file)
@@ -1,6 +1,5 @@
 global
 #   nbthread 1
-    insecure-fork-wanted
     maxconn 5000
     hard-stop-after 10s
 #   log localhost:514 local7 debug