Hello Pierre,
On Fri, Jan 5, 2018 at 11:48 AM, Pierre Cheynier <p.cheyn...@criteo.com> wrote: > Hi list, > > We've recently tried to upgrade from 1.8.0 to 1.8.1, then 1.8.2, 1.8.3 > on a preprod environment and noticed that the reload is not so seamless > since 1.8.1 (easily getting TCP RSTs while reloading). > > Having a short look on the haproxy-1.8 git remote on the changes > affecting haproxy.c, c2b28144 can be eliminated, so 3 commits remains: > > * 3ce53f66 MINOR: threads: Fix pthread_setaffinity_np on FreeBSD. (5 > weeks ago) > * f926969a BUG/MINOR: mworker: detach from tty when in daemon mode (5 > weeks ago) > * 4e612023 BUG/MINOR: mworker: fix validity check for the pipe FDs (5 > weeks ago) > > In case it matters: we use threads and did the usual worker setup (which > again works very well in 1.8.0). Ok, so the change in behavior is between 1.8.0 and 1.8.1. > $ cat /usr/lib/systemd/system/haproxy.service > [Unit] > Description=HAProxy Load Balancer > After=syslog.target network.target > > [Service] > EnvironmentFile=/etc/sysconfig/haproxy > ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q > ExecStart=/usr/sbin/haproxy -W -f $CONFIG -p $PIDFILE $OPTIONS > ExecReload=/usr/sbin/haproxy -f $CONFIG -c -q > ExecReload=/bin/kill -USR2 $MAINPID > Type=forking > KillMode=mixed > Restart=always Your systemd configuration is not uptodate. Please: - make sure haproxy is compiled with USE_SYSTEMD=1 - update the unit file: start haproxy with -Ws instead of -W (ExecStart) - update the unit file: use Type=notify instead of Type=forking We always ship an uptodate unit file in contrib/systemd/haproxy.service.in (just make sure you maintain the $OPTIONS variable, otherwise you are missing the -x call for the seamless reload). Run "systemctl daemon-reload" after updating the unit file and completely stop the old service (don't reload after updating the unit file), to make sure you have a "clean" situation. I don't see how this systemd thing would affect the actual seamless reload (systemd shouldn't be a requirement), but lets fix it nonetheless before continuing the troubleshooting. Maybe the regression only affects non-systemd mode. Regards, Lukas