haproxy: enable hitless reloads

Switch HAProxy to a master/worker (-W) model, allowing for correct
handling of HUP signals. To do listening FD handoff, a stats socket with
'expose-fd listeners' needs to be part of the configuration file.
This commit is contained in:
Zach Dykstra 2021-08-08 23:52:29 -05:00 committed by Érico Nogueira Rolim
parent 2cd1a4fd69
commit 02a53fb6e3
3 changed files with 3 additions and 2 deletions

View file

@ -2,6 +2,7 @@ global
chroot /var/lib/haproxy
user haproxy
group haproxy
stats socket /var/run/haproxy.sock mode 0600 level admin expose-fd listeners process 1/1
defaults
mode http

View file

@ -1,3 +1,3 @@
#!/bin/sh
exec haproxy -f /etc/haproxy/haproxy.cfg
exec haproxy -W -f /etc/haproxy/haproxy.cfg

View file

@ -1,7 +1,7 @@
# Template file for 'haproxy'
pkgname=haproxy
version=2.4.2
revision=1
revision=2
build_style=gnu-makefile
make_install_args="SBINDIR=${DESTDIR}/usr/bin DOCDIR=${DESTDIR}/usr/share/doc/${pkgname}"
hostmakedepends="lua53-devel"