HAProxy community

1.8.x Resolvers not working when multiple backend servers share the same hostname \ IP?

Hi @Baptiste,
I’m using server-template, this is my configuration

    default-server init-addr none resolvers consul resolve-prefer ipv4
    server-template server 4 _test._tcp.service.consul check resolve-accept-dup-ip

This could not worked. I think, you patched only server. Right?

Hi Mustafa,

Nope, I supposely patch everything, but I might have messed up.

Please note this is not the definitive patch and the option name will change.

I keep you updated asap with a new set of patches.

Baptiste

1 Like

I double checked it and it works well, as expected with server, default-server and server-template.

Note that I’m going to push those patches on the ML this afternoon (europe time)

Hi @Baptiste,

I tried. It is working now.

Can you add this patch to Haproxy-1.8 ?

Thank you.

Awesome!

What version number will this be in?

Cheers,
R.

1.8.12 seems ok.

I tried on 1.8.12 version

Hey

I meant which release of HAProxy will have this feature released?

Cheers,
R.

Hi,

Well, this is a new “feature” and we’re not supposed to backport them.

That said, this one is supposed to fix a regression… I’ll discuss this point with Willy and see what we could do.

Baptiste

Ah I see. I misunderstood then thinking it would appear in the next 1.8.x release.

It would be good to see it in 1.8 though as without this 1.8 would never be a viable version for our product.

Cheers,
R.

Ok I will ask for a backport in 1.8.

1 Like

Any further updates on this?

Cheers,
R,

It has been backported to v1.8 and will be in the v1.8.14 release, which will be published later this week.

Awesome! Many thanks for everything.

I attempted to use the flag resolve-accept-dup-ip however HAProxy 1.8.14 did not recognize it. The documentation is only up to 1.8.13, did the flag get changed for release @lukastribus ?

Yeah, the website with the docs is not updated yet, you can checkout doc/configuration.txt.

Looks like the option is not resolve-accept-dup-ip but resolve-opts allow-dup-ip instead:

server s1 myapp.example.com:80 check resolve-opts allow-dup-ip

http://git.haproxy.org/?p=haproxy-1.8.git;a=blob;f=doc/configuration.txt;h=580194ec4bd797ab85423b7a669d127bfc4cb1a8;hb=HEAD#l11626

1 Like

That’s worked a treat. I can finally upgrade all my environments to 1.8! Many thanks all!

Thanks! That helped a lot!!!

Online docs have been updated btw:
resolve-opts option

1 Like

A post was split to a new topic: Resolver: howto scale multiple servers