Welcome! Log In Create A New Profile

Advanced

[PATCH][MINOR] Implement resovle-opts with 2 new options

Posted by Baptiste 
Hi all,

This patch adds a new keyword "resolve-opts" which can take a list of comma
separated options.
2 options have been implemented for now:
* prevent-dup-ip: (default and historical way of working for HAProxy)
ensure this server will be the single one configured to an IP address, when
sharing the same fqdn than other servers in the same backend
* allow-dup-ip: allow multiple servers (they must all have this option
enabled) sharing the same fqdn to get an IP which is already used by an
other

The resolve-opts is compatible with server, default-server and
server-template. The latest configured value will win.
IE:
backend foobar
default-server resolve-opts allow-dup-ip
server s1 www.domain.tld
server s2 www.domain.tld
server s3 www.domain.tld resolve-opts prevent-dup-ip

==> only s1 and s2 could share the same IP in common.

Note that if the DNS server returns 2 records, there is no guarantee that
IPA will be affected to s1 and s2 and IPB to s3.
That's because, for now, the resolution is "atomic" and linked to the
server itself and that because the algorithm still search a different IP
before allowing a failover to an already used one (if allowed to).

The first 3 patches are clean up and the code is in the 4th one.

Note that I may move the other resolve-* keywords into the resolve-opts
(older keywords will still be valid for backward compatibility).

Baptiste
On Thu, Jul 12, 2018 at 05:10:49PM +0200, Baptiste wrote:
> Hi all,
>
> This patch adds a new keyword "resolve-opts" which can take a list of comma
> separated options.
(...)

applied, thank you Baptiste.

Willy
Sorry, only registered users may post in this forum.

Click here to login