SHA256
1
0
forked from pool/haproxy

Accepting request 254868 from network:ha-clustering:Factory

1

OBS-URL: https://build.opensuse.org/request/show/254868
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/haproxy?expand=0&rev=16
This commit is contained in:
Stephan Kulow 2014-10-11 17:26:21 +00:00 committed by Git OBS Bridge
parent 5f3418bf73
commit 6cdbd8d7c3
4 changed files with 59 additions and 2 deletions

View File

@ -0,0 +1,41 @@
From 1f24e3fee3aba83fb3338d17589d0ad0f34f6c73 Mon Sep 17 00:00:00 2001
From: Apollon Oikonomopoulos <apoikos@debian.org>
Date: Wed, 8 Oct 2014 15:14:41 +0300
Subject: [PATCH] BUG/MEDIUM: systemd: set KillMode to 'mixed'
By default systemd will send SIGTERM to all processes in the service's
control group. In our case, this includes the wrapper, the master
process and all worker processes.
Since commit c54bdd2a the wrapper actually catches SIGTERM and survives
to see the master process getting killed by systemd and regard this as
an error, placing the unit in a failed state during "systemctl stop".
Since the wrapper now handles SIGTERM by itself, we switch the kill mode
to 'mixed', which means that systemd will deliver the initial SIGTERM to
the wrapper only, and if the actual haproxy processes don't exit after a
given amount of time (default: 90s), a SIGKILL is sent to all remaining
processes in the control group. See systemd.kill(5) for more
information.
This should also be backported to 1.5.
(cherry picked from commit 74f016985ab1fa7a6a5afa301d982e77eba9c96a)
---
contrib/systemd/haproxy.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/systemd/haproxy.service.in b/contrib/systemd/haproxy.service.in
index 1a3d2c0..0bc5420 100644
--- a/contrib/systemd/haproxy.service.in
+++ b/contrib/systemd/haproxy.service.in
@@ -5,6 +5,7 @@ After=network.target
[Service]
ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
ExecReload=/bin/kill -USR2 $MAINPID
+KillMode=mixed
Restart=always
[Install]
--
1.8.4.5

View File

@ -1,5 +1,5 @@
diff --git a/contrib/systemd/haproxy.service.in b/contrib/systemd/haproxy.service.in
index 1a3d2c0..9b3b72a 100644
index 0bc5420..85937e4 100644
--- a/contrib/systemd/haproxy.service.in
+++ b/contrib/systemd/haproxy.service.in
@@ -3,6 +3,7 @@ Description=HAProxy Load Balancer
@ -9,4 +9,4 @@ index 1a3d2c0..9b3b72a 100644
+ExecStartPre=@SBINDIR@/haproxy -f /etc/haproxy/haproxy.cfg -c -q
ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
ExecReload=/bin/kill -USR2 $MAINPID
Restart=always
KillMode=mixed

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Oct 9 14:24:45 UTC 2014 - kgronlund@suse.com
- Fix check config before start patch to apply after previous patch
- Update patch: haproxy-1.5_check_config_before_start.patch
-------------------------------------------------------------------
Thu Oct 9 14:14:35 UTC 2014 - kgronlund@suse.com
- BUG/MEDIUM: systemd: set KillMode to 'mixed'
- Add patch:
- 0001-BUG-MEDIUM-systemd-set-KillMode-to-mixed.patch
-------------------------------------------------------------------
Wed Oct 8 12:53:41 UTC 2014 - kgronlund@suse.com

View File

@ -61,6 +61,8 @@ Patch1: haproxy-1.2.16_config_haproxy_user.patch
Patch2: haproxy-makefile_lib.patch
Patch3: sec-options.patch
Patch4: haproxy-1.5_check_config_before_start.patch
# PATCH-FIX-UPSTREAM: BUG/MEDIUM: systemd: set KillMode to 'mixed'
Patch5: 0001-BUG-MEDIUM-systemd-set-KillMode-to-mixed.patch
Source99: haproxy-rpmlintrc
#
@ -94,6 +96,7 @@ the most work done from every CPU cycle.
%patch1
%patch2
%patch3
%patch5 -p1
%patch4 -p1
%build