Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution #67359

Closed
xnox mannequin opened this issue Jan 5, 2015 · 5 comments
Closed

test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution #67359

xnox mannequin opened this issue Jan 5, 2015 · 5 comments
Labels
build The build process and cross-build topic-installation

Comments

@xnox
Copy link
Mannequin

xnox mannequin commented Jan 5, 2015

BPO 23170
Nosy @bitdancer, @xnox

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2015-01-05.18:24:30.169>
created_at = <Date 2015-01-05.17:12:35.279>
labels = ['build', 'expert-installation']
title = 'test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution'
updated_at = <Date 2015-01-05.18:24:30.167>
user = 'https://github.com/xnox'

bugs.python.org fields:

activity = <Date 2015-01-05.18:24:30.167>
actor = 'r.david.murray'
assignee = 'none'
closed = True
closed_date = <Date 2015-01-05.18:24:30.169>
closer = 'r.david.murray'
components = ['Installation']
creation = <Date 2015-01-05.17:12:35.279>
creator = 'xnox'
dependencies = []
files = []
hgrepos = []
issue_num = 23170
keywords = []
message_count = 5.0
messages = ['233467', '233469', '233471', '233472', '233474']
nosy_count = 2.0
nosy_names = ['r.david.murray', 'xnox']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue23170'
versions = ['Python 3.4']

@xnox
Copy link
Mannequin Author

xnox mannequin commented Jan 5, 2015

Building 3.4.2, running testsuite on linux,
test_uuid test_ifconfig_getnode fails as following:

[365/388] test_uuid
Warning -- sys.path was modified by test_site
test test_uuid failed -- Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.4.2/Lib/test/test_uuid.py", line 318, in test_ifconfig_getnode
    node = uuid._ifconfig_getnode()
  File "/builddir/build/BUILD/Python-3.4.2/Lib/uuid.py", line 356, in _ifconfig_getnode
    ip_addr = socket.gethostbyname(socket.gethostname())
socket.gaierror: [Errno -3] Temporary failure in name resolution

Note that "Use of the 'network' resource not enabled"

@xnox xnox mannequin added topic-installation build The build process and cross-build labels Jan 5, 2015
@bitdancer
Copy link
Member

That traceback doesn't match the uuid.py source, nor has _ifconfig_getnode been modified for quite some time. A line like your traceback says is in _ifconfig_getnode actually appears in _arp_getnode. The arp_getnode test would presumably have the same problem, since it is also not protected by either; however, that call to socket in uuid.py, which is the only such call in the file, is protected by a try/except for OSError, so no error should be bubbling up from it.

Can you investigate further, please?

@xnox
Copy link
Mannequin Author

xnox mannequin commented Jan 5, 2015

The source code matches 3.4.2 tarball exactly.

There is no arp_getnode test that I can see.

316 @unittest.skipUnless(os.name == 'posix', 'requires Posix')
317 def test_ifconfig_getnode(self):
318 node = uuid._ifconfig_getnode()
319 if node is not None:
320 self.check_node(node, 'ifconfig')

346def _ifconfig_getnode():
347 """Get the hardware address on Unix by running ifconfig."""
348
349 # This works on Linux ('' or '-a'), Tru64 ('-av'), but not all Unixes.
350 for args in ('', '-a', '-av'):
351 mac = _find_mac('ifconfig', args, ['hwaddr', 'ether'], lambda i: i+1)
352 if mac:
353 return mac
354
355 import socket
356 ip_addr = socket.gethostbyname(socket.gethostname())
357
358 # Try getting the MAC addr from arp based on our IP address (Solaris).
359 mac = _find_mac('arp', '-an', [ip_addr], lambda i: -1)
360 if mac:
361 return mac
362
363 # This might work on HP-UX.
364 mac = _find_mac('lanscan', '-ai', ['lan0'], lambda i: 0)
365 if mac:
366 return mac
367
368 return None

And I do not see any try/except protections around it.

@xnox
Copy link
Mannequin Author

xnox mannequin commented Jan 5, 2015

I guess this is related to http://bugs.python.org/issue17293 however I get a test-suite fail / exception there with 3.4.2 on Linux.

@bitdancer
Copy link
Member

Ah, I see what happened. Serhiy split _ifconfig_getnode, so when I did an hg annotate it looked like _ifconfig_getnode was untouched, but in fact it had been split to create the _arp_getnode function.

So, this report is out of date, this has already been fixed in 3.4.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build topic-installation
Projects
None yet
Development

No branches or pull requests

1 participant