Hi list,

I'm facing some issues with already in use ports and the fallback feature, during a reload. SO_REUSEPORT already makes ist easier/better but not perfect, as there are still cases were it fails. In my test case I've got a Squid running on port 80 and a HAProxy with "master-worker no-exit-on-failure". I am using the shipped (2.0.8) systemd unit file and startup HAProxy with some frontend and a bind on like 1337 or something. I then add another bind for port 80, which is in use by squid already and try to reload HAProxy. It takes some time until it failes:

Nov 19 14:39:21 894a0f616fec haproxy[2978]: [WARNING] 322/143921 (2978) : Reexecuting Master process
...
Nov 19 14:39:28 894a0f616fec haproxy[2978]: [ALERT] 322/143922 (2978) : Starting frontend somefrontend: cannot bind socket [0.0.0.0:80]
...
Nov 19 14:39:28 894a0f616fec systemd[1]: haproxy.service: Main process exited, code=exited, status=1/FAILURE

The reload itself is still running (systemd) and will timeout after about 90s. After that, because of the Restart=always, I guess, it ends up in a restart loop.

So I would have expected that the master process will fallback to the old process and proceed with the old child until the problem has been fixed.

Can anybody confirm that? Is that intended?

https://cbonte.github.io/haproxy-dconv/2.0/management.html#4
https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#3.1-master-worker

--
Regards,
Christian Ruppert

Reply via email to