]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: cpu-topo: use ha_diag_notice() to report thread creations
authorWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2026 16:40:08 +0000 (18:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2026 16:49:57 +0000 (18:49 +0200)
commit960fa1c92146a9acb0899fff89397413890b5e57
treeb6841e5883bb58dea790ba93f860f44cdf9e6aea
parent7d63efa5f56b4ae111829ac45ea1ad7174991bad
BUG/MINOR: cpu-topo: use ha_diag_notice() to report thread creations

Using ha_diag_warning() to report the number of threads created resulted
in warnings being counted and possibly an error being fired when combined
with -dW:

  $ printf "global\nstats socket /tmp/sock1\n" | ./haproxy -dD -dW -c -f /dev/stdin; echo $?
  [NOTICE]   (10406) : haproxy version is 3.5-dev0-5091ac-35
  [NOTICE]   (10406) : path to executable is ./haproxy
  [DIAG]     (10406) : Created 20 threads split into 2 groups
  [ALERT]    (10406) : Some warnings were found and 'zero-warning' is set. Aborting.
  1

Now that we have ha_diag_notice(), let's use it:

  $ printf "global\nstats socket /tmp/sock1\n" | ./haproxy -dD -dW -c -f /dev/stdin; echo $?
  [DIAG]     (10513) : Created 20 threads split into 2 groups
  0

It would make sense to backport this to 3.2 because it helps validate configs
against diag warnings without triggering a false positive. It depends on
this previous patch:

  MINOR: errors: add ha_diag_notice() to report diag-level notifications
src/cpu_topo.c