[pve-devel] [RFC cluster 3/6] cluster create: use new corosync-link format for totem interfaces

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed May 29 12:31:40 CEST 2019


On Wed, May 29, 2019 at 11:48:11AM +0200, Wolfgang Bumiller wrote:
> On Wed, May 29, 2019 at 11:16:50AM +0200, Thomas Lamprecht wrote:
> > On 5/29/19 10:45 AM, Fabian Grünbichler wrote:
> > > On Tue, May 28, 2019 at 06:33:10PM +0200, Thomas Lamprecht wrote:
> > >> @@ -218,7 +220,7 @@ sub create_conf {
> > >>  	    ip_version => $use_ipv6 ? 'ipv6' : 'ipv4',
> > > 
> > > and instead either set ip_version to 'ipv4-6' (ask DNS, prefer IPv4) or
> > > leave it out altogether (which defaults to 'ipv6-4' for knet).
> > 
> > OK, we still fallback to the IP resolved by node's hostname, so this
> > works for default cases too, I mean internally they hopefully don't
> > try to do a DNS lookup if they get an IP? man page does not specifies
> > the exact behavior, but it really should do so..
> > 
> > @Wolfgang, any issues you can think of with IPv6-4, i.e., prefer first
> > IPv6 addr found over IPv4 addr found?
> 
> IMO this is a wrong design on corosync side? Why is there no "just use
> the first address from getaddrinfo()?" or "just try them in order",
> those are the only 2 correct behaviors IMO, anything else just causes
> weird edge cases.
> 
> Systems can can already define a preference used by getaddrinfo()
> (/etc/gai.conf), and and it even has a flag (AI_ADDRCONFIG) to assert
> that the returned address is only used if a local address of the same
> family actually exists on the system...
> 
> It's weird.

and probably there for historic reasons:
the cluster name is used to derive the UDP mcast address for the legacy
'udp' transport, if no explicit one is given. obviously this needs to be
either IPv4 or IPv6, and identical for the whole cluster. so ip_version
is used not only for deciding which kind of gai result to use when
resolving nodes' names, it's also used to decide which family that mcast
address should have when generating a fallback one.

a quick glance showed no reason to not just honor gai for knet - I'll
propose this upstream.




More information about the pve-devel mailing list