On Wed, Nov 30, 2011 at 06:42:54PM +0100, Miroslav Suchy wrote:
> >
> >in the hostname. You should really check (and test) various scenarios,
> >not overwrite the hostname if it already is set from the IPv4 pass,
> >and not set it if you get IP address back.
> 
> How should I decide which hostname is correct?

The current behaviour is to take the IPv4-related hostname. You should
not change the behaviour too much.

> And what should I do with machine with IPv4 address 123.45.56.67
> which resolves to machine1.broken.dns and IPv6 address
> 2620:52:0:2223:20c:29ff:fe0e:d05b which resolves
> machine2.broken.dns?

Use machine1.broken.dns because that's what the code did so far
anyway.

> If you are unable to resolve the hostname using gethostbyaddr()
> (getfqdn() is essentially wrapper around this one function), then
> you do not deserve sane data. If user has broken networking, he
> should fix it in first place.

Why should a person be forced to have a valid IPv6 DNS?

> Hmm what I can do is:
> hostname_tmp = socket.getfqdn(intf_tmp)
> if hostname_tmp != intf_tmp:
>    hostname = hostname_tmp
> 
> But you can admit, that user can be so ugly, that machine with
> hostname 123.45.56.67 will have IPv4 address 123.45.56.67.
> 
> I do not think we can catch all possibilities here.

We should not regress.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to