Skip to content

Commit f8010bb

Browse files
committed
Bug 1394793: remove nslookup calls on download failure; r=aki
History suggests these have been in place for a long time, back to an era when we used split-horizon DNS and DNS service was flaky. We don't see this sort of error very often anymore. Now we have docker images that do not have nslookup installed, and this is causing retries to fail. The other option is to use `socket.getaddrinfo` here, but that introduces new failure mode and could prevent retries that would otherwise succeed. The least failure-prone approach is just to remove the calls. MozReview-Commit-ID: JDjhYxUrROS UltraBlame original commit: 2f514d66bb019f15d83a51c968ec82fbf42e4443
1 parent c24eb31 commit f8010bb

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

testing/mozharness/external_tools/download_file.py

-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ def download_file(url, file_name):
4040
raise
4141
except urllib2.URLError, e:
4242
print "URL Error: %s" % url
43-
remote_host = urlparse.urlsplit(url)[1]
44-
if remote_host:
45-
os.system("nslookup %s" % remote_host)
4643
raise
4744
except socket.timeout, e:
4845
print "Timed out accessing %s: %s" % (url, str(e))

testing/mozharness/mozharness/base/script.py

-10
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,6 @@ def _download_file(self, url, file_name):
502502
if isinstance(e.args[0], OSError) and e.args[0].errno == errno.ENOENT:
503503
raise e.args[0]
504504

505-
remote_host = urlparse.urlsplit(url)[1]
506-
if remote_host:
507-
nslookup = self.query_exe('nslookup')
508-
error_list = [{
509-
'substr': "server can't find %s" % remote_host,
510-
'level': ERROR,
511-
'explanation': "Either %s is an invalid hostname, or DNS is busted." % remote_host,
512-
}]
513-
self.run_command([nslookup, remote_host],
514-
error_list=error_list)
515505
raise
516506
except socket.timeout, e:
517507
self.warning("Timed out accessing %s: %s" % (url, str(e)))

0 commit comments

Comments
 (0)