BUG/MINOR: stats: use refcount to protect dynamic server on dump
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 25 Aug 2021 12:39:53 +0000 (14:39 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 25 Aug 2021 13:53:43 +0000 (15:53 +0200)
commit0a8d05d31cc30279f4636ae1025d9e43d53719c9
treea1f17b1c3edc0a17f7b6cf791e24214f1deb25a8
parentf5c1e12e44e1caa0185e063daf00fb8841c2ed3d
BUG/MINOR: stats: use refcount to protect dynamic server on dump

A dynamic server may be deleted at runtime at the same moment when the
stats applet is pointing to it. Use the server refcount to prevent
deletion in this case.

This should be backported up to 2.4, with an observability period of 2
weeks. Note that it requires the dynamic server refcounting feature
which has been implemented on 2.5; the following commits are required :

- MINOR: server: implement a refcount for dynamic servers
- BUG/MINOR: server: do not use refcount in free_server in stopping mode
- MINOR: server: return the next srv instance on free_server
include/haproxy/server.h
src/server.c
src/stats.c