Package: haproxy
Version: 1.8.19-1+deb10u1

I believe there is an inconsistency in the location of the PID file.
In /lib/systemd/system/haproxy.service the PID file is /run/haproxy.pid.
In /etc/init.d/haproxy the PID file is /var/run/${BASENAME}.pid.

This means that when someone runs the init script to reload the haproxy config 
the old process keeps running with the old config.
Also if anyone follows the HAProxy documentation and runs the reload command 
the old process will keep running with the old config.

See http://cbonte.github.io/haproxy-dconv/2.0/management.html#3
A safe way to start HAProxy from an init file consists in forcing the daemon
mode, storing existing pids to a pid file and using this pid file to notify
older processes to finish before leaving :

   haproxy -f /etc/haproxy.cfg \
           -D -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid)

I suggest that the PID file location be set to /var/run/haproxy.pid to match 
the HAProxy documentation and community documentation.

Chris Hide 
Software Engineer 
Calero-MDSL 
o: tel:2287 
http://www.calero.com 
http://www.mdsl.com 
--------------------------------------------------------------------------------------------------------------------------------------------------
This message is for the designated recipient(s) only and may contain 
privileged, proprietary, and/or confidential information.
If you have received it in error, please notify the sender immediately and 
delete the original. Any other use of the email by you is prohibited. 
Any views or opinions expressed are solely those of the author and do not 
necessarily represent those of MDSL. 
--------------------------------------------------------------------------------------------------------------------------------------------------
Registered Information
MARKET DATA SERVICES LIMITED, FLOOR 2 BUILDING 4, CENTURY PLACE, LAMBERTS ROAD, 
TUNBRIDGE WELLS, KENT, TN2 3EH, UNITED KINGDOM
Company No: 03031342 | VAT Reg. No.: GB624962327

Reply via email to