checkbox virtualization test fails if image is not pre-downloaded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Fix Released
|
High
|
Daniel Manrique |
Bug Description
When testing with full Internet connections, checkbox should be able to download virtualization images automatically, but this fails:
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.
OSError: [Errno 101] Network is unreachable
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.
OSError: [Errno 101] Network is unreachable
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.
That's from a test under 14.04 beta (run March 12, 2014), but I see something similar ("Network is unreachable" error) under 12.04.4. The network tests do succeed (with a fix for bug #1288412 in place), and the system has no other obvious network problems -- it successfully downloaded checkbox via APT, for instance. The virtualization test succeeds when it's re-run with a pre-downloaded image. Thus, I suspect the network tests may be leaving the network unconfigured (although the network is back up by the end of the overall checkbox run).
Related branches
- Daniel Manrique (community): Needs Resubmitting
- Zygmunt Krynicki (community): Approve
-
Diff: 31 lines (+5/-3)1 file modifiedplainbox-provider-checkbox/provider_bin/virtualization (+5/-3)
Changed in checkbox: | |
assignee: | nobody → Daniel Manrique (roadmr) |
status: | Incomplete → In Progress |
milestone: | none → 2014-mar-28 |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
affects: | checkbox → plainbox-provider-checkbox |
Changed in plainbox-provider-checkbox: | |
milestone: | 2014-mar-28 → none |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |
milestone: | none → 0.5 |
We kept that behavior in the virtualization script because if it has no image and is unable to download one, it's reasonable for it to barf loudly, particularly if, as reported, the network is unreachable (which is not the virtualization script's fault, poor thing). Still, we could maybe update this so the way it tracebacks and explodes is not so violent. A simple "unable to download image, test failed" should suffice.
Could you please run the virt script standalone, to confirm your assessment that a prior test is leaving the network unconfigured?
ensure the network is up and running, and do:
/usr/share/ checkbox/ scripts/ virtualization kvm --debug
If so, we'd have two things to fix: better handling of exceptions in virtualization, and determining which test kills the network and ensure we at least wait for it to be up before running the following tests.