]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: pools: Fix the dump of pools info to deal with buffers limitations
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Sep 2025 13:19:04 +0000 (15:19 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Sep 2025 14:01:51 +0000 (16:01 +0200)
commit982805e6a3a08121bf7588199c5ca3df95a6e1fc
tree3b1a07ef31c6dbed45740207c62acda01cf19c03
parentd75718af1465687353c947fd5ab02ce5638ff1a2
BUG/MINOR: pools: Fix the dump of pools info to deal with buffers limitations

The "show pools" CLI command was not designed to dump information exceeding
the size of a buffer. But there is now much more pools than few years ago
and when detailed information are dumped, we exceeds the buffer limit and
the output is truncated.

To fix the issue, the command must be refactored to be able to stream the
result. To do so, the array containing pools info is now part of the command
context and it is dynamically allocated. A dedicated function was created to
fill all info. In addition, the index of the next pool to dump is saved in
the command context too to properly handle resumption cases. Finally global
information about pools are also stored in the command context for
convenience.

This patch should fix the issue #3067. It must be backported to 3.2. On
older release, the buffer limit is never reached.
src/pool.c