Hi everyone,

first of all, thank you all for your amazing work on HAProxy!

I am writing to you today because my colleague Alexander and I am experiencing 
a bug in our HAProxy deployment for which we hope to present an acceptable 
patch.

The bug seems to be a regression introduced by 
5e5152<https://github.com/haproxy/haproxy/commit/25e515235a8ddd7590b222980990baab764680ec>
 targeting the server IP address initialization path. When a server-state-file 
is used during HAProxy reload and the server-state-file contains a valid IP 
address for a server, the original server IP address from the HAProxy config 
takes precedence. The same is not the case for the server's port.

This leads to the situation that when a servers IP address has been altered 
during operation, for example by issuing „set server b1/s1 addr 1.1.1.1“ to the 
socket API and HAProxy is reloaded with the server-state-file enabled, the 
servers IP address is reset its original IP address. For more details and a 
portable script that reproduces the bug, please have a look at the 
issue<https://github.com/haproxy/haproxy/issues/3265> we created, specifically 
this 
comment<https://github.com/haproxy/haproxy/issues/3265#issuecomment-3889562797>.

The attached patch adjusts the server address initialization behavior such that 
IP addresses from the server-state-file take precedence if available.

Big thanks to Daralet wo helped guide this patch so far.

Please keep us in CC if possible. We look forward to all your inputs on this 
issue.

Best regards,
Benedict

Attachment: BUG-MINOR-server-fix-server-state-file-servers-ip-ad.patch
Description: BUG-MINOR-server-fix-server-state-file-servers-ip-ad.patch

Reply via email to