Message187065
Still seeing this on Fedora 18 / Python 2.7.3.
I only have loopback in /etc/hosts
[TUE\shoop@pclin281] <~> cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
I search in .campus.tue.nl and .win.tue.nl:
[TUE\shoop@pclin281] <~> grep search /etc/resolv.conf
search campus.tue.nl. win.tue.nl.
Hostname -f reliably returns .campus.tue.nl as it should
[TUE\shoop@pclin281] <~> hostname -f
pclin281.campus.tue.nl
[TUE\shoop@pclin281] <~> hostname -f
pclin281.campus.tue.nl
But socket.getfqdn disagrees, even with itself when run multiple times:
[TUE\shoop@pclin281] <~> python
Python 2.7.3 (default, Aug 9 2012, 17:23:57)
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getfqdn()
'pclin281'
>>> socket.getfqdn()
'pclin281.win.tue.nl'
>>> socket.getfqdn()
'pclin281'
>>> socket.getfqdn()
'pclin281.win.tue.nl'
>>>
Note that pclin281.win.tue.nl is in fact also a valid DNS entry, but not one that I would expect the function to ever return given the search order. |
|
Date |
User |
Action |
Args |
2013-04-16 10:35:25 | Stijn.Hoop | set | recipients:
+ Stijn.Hoop, loewis, dfranke, mcjeff, BreamoreBoy, ankitoshniwal |
2013-04-16 10:35:25 | Stijn.Hoop | set | messageid: <1366108525.31.0.437864962387.issue5004@psf.upfronthosting.co.za> |
2013-04-16 10:35:25 | Stijn.Hoop | link | issue5004 messages |
2013-04-16 10:35:24 | Stijn.Hoop | create | |
|