unhandled exceptions in virtualization test when unable to download cloud image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Fix Released
|
High
|
Daniel Manrique |
Bug Description
Tester did not have a local cloud image copy, and did not specify one in the config file. When the virtualization test ran, the results were tracebacks and unhandled exception errors:
Executing KVM Test
WARNING:
DEBUG:root:Starting KVM Test
DEBUG:root:No image specified, downloading one now.
DEBUG:root:
Traceback (most recent call last):
File "/usr/lib/
h.request(
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.send(msg)
File "/usr/lib/
self.connect()
File "/usr/lib/
self.timeout, self.source_
File "/usr/lib/
raise err
File "/usr/lib/
sock.
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/
main()
File "/usr/share/
args.func(args)
File "/usr/share/
result = kvm_test.start()
File "/usr/share/
self.image = self.download_
File "/usr/share/
resp = urllib.
File "/usr/lib/
with contextlib.
File "/usr/lib/
return opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
'_open', req)
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
raise URLError(err)
urllib.
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/
binary = os.path.
FileNotFoundError: [Errno 2] No such file or directory
Original exception was:
Traceback (most recent call last):
File "/usr/lib/
h.request(
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.send(msg)
File "/usr/lib/
self.connect()
File "/usr/lib/
self.timeout, self.source_
File "/usr/lib/
raise err
File "/usr/lib/
sock.
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/
main()
File "/usr/share/
args.func(args)
File "/usr/share/
result = kvm_test.start()
File "/usr/share/
self.image = self.download_
File "/usr/share/
resp = urllib.
File "/usr/lib/
with contextlib.
File "/usr/lib/
return opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
'_open', req)
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
raise URLError(err)
urllib.
Related branches
- Zygmunt Krynicki (community): Approve
-
Diff: 14 lines (+4/-1)1 file modifiedproviders/plainbox-provider-checkbox/bin/virtualization (+4/-1)
Changed in plainbox-provider-checkbox: | |
status: | Triaged → In Progress |
assignee: | nobody → Daniel Manrique (roadmr) |
Changed in plainbox-provider-checkbox: | |
status: | In Progress → Fix Committed |
no longer affects: | checkbox |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |
milestone: | none → 0.5 |
This is probably caused by connection wonkiness; the script is trying to download a cloudimage but running into a timeout:
urllib. error.URLError: <urlopen error [Errno 110] Connection timed out>
The root cause of this is the connection trouble; I suggest the user try to download the given URL manually to diagnose things:
trusty- server- cloudimg- i386-disk1. img, from http:// cloud-images. ubuntu. com
Of course, the traces are ugly and make users unhappy :( in our code, the problem is that we're not catching the URLError exception that urlretrieve can raise. We can add that exception to the list in line 85 of the script to at least result in a friendly error message and clean failure, rather than end-of-the-world as it is now.