]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mworker: restore initial env before wait mode
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 21 Aug 2024 17:07:22 +0000 (19:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Aug 2024 15:06:59 +0000 (17:06 +0200)
commit7b78e1571b97216cdf4979b561cd1fa12bcd7e0f
tree7857ae7c7c8a6e404b688ab421bd515c8cc6e6da
parent1811d2a6ba78181c51085f01f5138b735446c2e5
MINOR: mworker: restore initial env before wait mode

This patch is the follow-up of 1811d2a6ba (MINOR: tools: add helpers to
backup/clean/restore env).

In order to avoid unexpected behaviour in master-worker mode during the process
reload with a new configuration, when the old one has contained '*env' keywords,
let's backup its initial environment before calling parse_cfg() and let's clean
and restore it in the context of master process, just before it enters in a wait
polling loop.

This will garantee that new workers will have a new updated environment and not
the previous one inherited from the master, which does not read the configuration,
when it's in a wait-mode.
include/haproxy/global.h
src/haproxy.c