On Wed, Jun 30, 2010 at 2:57 PM, Manuel Franceschini <[email protected]> wrote: > On Wed, Jun 30, 2010 at 3:04 PM, Guido Trotter <[email protected]> wrote: >> On Wed, Jun 30, 2010 at 1:14 PM, Manuel Franceschini >> <[email protected]> wrote: >> >>> + daemon.AsyncUDPSocket.__init__(self, >>> utils.GetAddressFamily(bind_address)) >> >> Are you sure this works? bind_address is '' by default and >> GetAddressFamily fails on that. > > By default it is "0.0.0.0". Currently if an invalid address is passed > we fail with 'socket.gaierror'. This improves that by raising a > 'GenericError' that GetAddressFamily throws. >
Right... Mmm... the docstring still says that by default it's ''. Wonder when that changed, and if we should fix the docstring. :) >> Also, if bind_address is '' I'd say we should create two sockets, and >> bind on both ip4 and ip6, if the hosts has addresses/supports either. > > The plan was to use a cluster-level parameter to determine whether > IPv4 or IPv6 is preferred. Based on that information we could bind > confd. What about doing that for now and see whether/how we support > hybrid clusters? Well, for confd for example it's quite simple to support either, as it's a quite standalone component. I wouldn't say "let's have 3 nodes on v4 and 3 on v6" but for example having rapi and confd reachable by either sounds worth it. And a good path to transition. We'd need to save both the v4 and v6 ip in the config file for this to work, but I guess that would be doable. What do you think? Guido
