- Major version jump from v2.0 to v2.1 - Update haproxy download URL and hash - Add new patches (see https://www.haproxy.org/bugs/bugs-2.1.2.html) - Stop building LUA 5.3 in the haproxy build-process and use liblua5.3 as a dependency instead Signed-off-by: Christian Lachner <gladiac@gmail.com>
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
commit 6869fa88766cdb07564f321905c39f191da9035b
|
|
Author: William Lallemand <wlallemand@haproxy.com>
|
|
Date: Tue Jan 14 17:58:18 2020 +0100
|
|
|
|
BUG/MEDIUM: mworker: remain in mworker mode during reload
|
|
|
|
If you reload an haproxy started in master-worker mode with
|
|
"master-worker" in the configuration, and no "-W" argument,
|
|
the new process lost the fact that is was in master-worker mode
|
|
resulting in weird behaviors.
|
|
|
|
The bigest problem is that if it is reloaded with an bad configuration,
|
|
the master will exits instead of remaining in waitpid mode.
|
|
|
|
This problem was discovered in bug #443.
|
|
|
|
Should be backported in every version using the master-worker mode.
|
|
(as far as 1.8)
|
|
|
|
(cherry picked from commit 24c928c8bd86f6899d39dd5cd04b3e50b4b993a8)
|
|
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
|
|
|
|
diff --git a/src/haproxy.c b/src/haproxy.c
|
|
index 10ba128d0..a66a184dc 100644
|
|
--- a/src/haproxy.c
|
|
+++ b/src/haproxy.c
|
|
@@ -1501,6 +1501,10 @@ static void init(int argc, char **argv)
|
|
memcpy(localpeer, hostname, (sizeof(hostname) > sizeof(localpeer) ? sizeof(localpeer) : sizeof(hostname)) - 1);
|
|
setenv("HAPROXY_LOCALPEER", localpeer, 1);
|
|
|
|
+ /* we were in mworker mode, we should restart in mworker mode */
|
|
+ if (getenv("HAPROXY_MWORKER_REEXEC") != NULL)
|
|
+ global.mode |= MODE_MWORKER;
|
|
+
|
|
/*
|
|
* Initialize the previously static variables.
|
|
*/
|