On Thu, Jul 1, 2010 at 9:16 AM, Manuel Franceschini <[email protected]> wrote:
> On Wed, Jun 30, 2010 at 5:08 PM, Guido Trotter <[email protected]> wrote:
>> 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. :)
>
> I think an empty string should raise an exception (as it does with
> this patch). I removed that from the docstring. Allowed values are
> either a valid address or IP{4,6}_ADDRESS_ANY.
>
>>>> 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.
>
> It is certainly doable and might be worth it. However, if the
> cluster-level preference is, say, IPv4 and not all nodes have IPv6
> enabled, we could end up with a hybrid setup. Do we want that? For
> consistency and error detection it is simpler and more robust to have
> a preference (either IPv4 or IPv6 or both) and then check whether all
> (affected) nodes comply to that. In other words, if the cluster
> preference is IPv4 we should not automagically accept IPv6
> connections.
>
> In order to achieve that, we could introduce a IP_ADDRESS_ANY constant
> that would instruct a daemon to create sockets for both IPv4 and IPv6.
> What do you think?
>

Agreed,

Thanks,

Guido

Reply via email to