Bug 1444709
Summary: | haproxy status failed after stopping the service | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Marko Myllynen <myllynen> |
Component: | haproxy | Assignee: | Ryan O'Hara <rohara> |
Status: | CLOSED ERRATA | QA Contact: | Brandon Perkins <bperkins> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 7.3 | CC: | fdinitto, ffotorel, jeharris, rohara |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | haproxy-1.5.18-6.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 21:31:54 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Marko Myllynen
2017-04-24 04:49:57 UTC
Need more information. Does this happen every time you attempt to stop haproxy? Do you have logs? Etc. Yes, this happens every time and is trivial to reproduce: # rpm -V haproxy # systemctl start haproxy # systemctl status haproxy ● haproxy.service - HAProxy Load Balancer Loaded: loaded (/usr/lib/systemd/system/haproxy.service; disabled; vendor preset: disabled) Active: active (running) since Fri 2017-04-28 14:26:28 EEST; 3s ago Main PID: 9396 (haproxy-systemd) CGroup: /system.slice/haproxy.service ├─9396 /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid ├─9397 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds └─9398 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds Apr 28 14:26:28 mars systemd[1]: Started HAProxy Load Balancer. Apr 28 14:26:28 mars systemd[1]: Starting HAProxy Load Balancer... Apr 28 14:26:28 mars haproxy-systemd-wrapper[9396]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds # systemctl stop haproxy # systemctl status haproxy ● haproxy.service - HAProxy Load Balancer Loaded: loaded (/usr/lib/systemd/system/haproxy.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2017-04-28 14:26:38 EEST; 1s ago Process: 9396 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS (code=exited, status=143) Main PID: 9396 (code=exited, status=143) Apr 28 14:26:28 mars systemd[1]: Started HAProxy Load Balancer. Apr 28 14:26:28 mars systemd[1]: Starting HAProxy Load Balancer... Apr 28 14:26:28 mars haproxy-systemd-wrapper[9396]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds Apr 28 14:26:38 mars systemd[1]: Stopping HAProxy Load Balancer... Apr 28 14:26:38 mars haproxy-systemd-wrapper[9396]: haproxy-systemd-wrapper: SIGTERM -> 9398. Apr 28 14:26:38 mars haproxy-systemd-wrapper[9396]: haproxy-systemd-wrapper: exit, haproxy RC=143 Apr 28 14:26:38 mars systemd[1]: haproxy.service: main process exited, code=exited, status=143/n/a Apr 28 14:26:38 mars systemd[1]: Stopped HAProxy Load Balancer. Apr 28 14:26:38 mars systemd[1]: Unit haproxy.service entered failed state. Apr 28 14:26:38 mars systemd[1]: haproxy.service failed. zsh: exit 3 systemctl status haproxy # thanks. OK. This is strange since we patched haproxy not too long ago and verified that we were exited with RC=0. Anyway, it appears that the solution is to simple use KillMode=mixed in the haproxy.service file: # cat /usr/lib/systemd/system/haproxy.service [Unit] Description=HAProxy Load Balancer After=syslog.target network.target [Service] EnvironmentFile=/etc/sysconfig/haproxy ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS ExecReload=/bin/kill -USR2 $MAINPID KillMode=mixed [Install] WantedBy=multi-user.target # systemctl start haproxy # systemctl stop haproxy # systemctl status haproxy ● haproxy.service - HAProxy Load Balancer Loaded: loaded (/usr/lib/systemd/system/haproxy.service; disabled; vendor preset: disabled) Active: inactive (dead) Apr 28 07:37:24 mesa-01 systemd[1]: Stopped HAProxy Load Balancer. Apr 28 07:37:24 mesa-01 systemd[1]: Unit haproxy.service entered failed state. Apr 28 07:37:24 mesa-01 systemd[1]: haproxy.service failed. Apr 28 07:51:16 mesa-01 systemd[1]: Started HAProxy Load Balancer. Apr 28 07:51:16 mesa-01 systemd[1]: Starting HAProxy Load Balancer... Apr 28 07:51:16 mesa-01 haproxy-systemd-wrapper[36180]: haproxy-systemd-wrapper: executing /usr...Ds Apr 28 07:51:27 mesa-01 haproxy-systemd-wrapper[36180]: haproxy-systemd-wrapper: SIGTERM -> 36182. Apr 28 07:51:27 mesa-01 systemd[1]: Stopping HAProxy Load Balancer... Apr 28 07:51:27 mesa-01 haproxy-systemd-wrapper[36180]: haproxy-systemd-wrapper: exit, haproxy RC=0 Apr 28 07:51:27 mesa-01 systemd[1]: Stopped HAProxy Load Balancer. Hint: Some lines were ellipsized, use -l to show in full. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2170 |