Failure of adt-buildvm-ubuntu-cloud after qemu isn't installed causes re-download of image

Bug #1460066 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

$ adt-buildvm-ubuntu-cloud -r wily
WARNING: python-distro-info not installed, falling back to determining default release from currently installed release
Downloading http://cloud-images.ubuntu.com/wily/current/wily-server-cloudimg-amd64-disk1.img...
283.8/285.2 MB (100%)
Download successful.
Resizing image, adding 4G...
Image resized.
Building seed image...
Booting image to run cloud-init...
Traceback (most recent call last):
  File "/usr/bin/adt-buildvm-ubuntu-cloud", line 318, in <module>
    boot_image(image, seed, args.qemu_command, args.verbose)
  File "/usr/bin/adt-buildvm-ubuntu-cloud", line 278, in boot_image
    '-drive', 'file=%s,if=virtio,readonly' % seed])
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'qemu-system-x86_64'

It's OK that qemu wasn't found - that part was my fault. But I didn't expect it to spend minutes downloading (slow connection) and *then* fail with this, yet not cache the image so retrying is painful.

Can we do any of:

1) Cache downloaded images before this failure
2) Detect that qemu isn't available and fail before download, given that qemu isn't a Depends or Recommends.

Version: 3.13

Thanks

Revision history for this message
Robie Basak (racb) wrote :

And I get a second failure after fixing the first one, requiring yet another re-download after I added myself to the kvm group:

Resizing image, adding 4G...
Image resized.
Building seed image...
Booting image to run cloud-init...
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
qemu failed with status 1
Moving image into final destination ./adt-wily-amd64-cloud.img

Revision history for this message
Robie Basak (racb) wrote :

(incidentally if qemu failed, then perhaps the whole thing should have failed? Is that another bug?)

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in autopkgtest (Ubuntu):
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.14.3

---------------
autopkgtest (3.14.3) unstable; urgency=medium

  * adt-virt-lxc: Don't try to set up a shared downtmp with unprivileged
    (user) containers. This is full of permission errors due to the mapped
    UIDs.
  * tests/adt-run LxcRunner: Use $ADT_TEST_LXC as unprivileged user container
    if it exists.
  * adt-buildvm-ubuntu-cloud: Check at the beginning if QEMU command is
    available and exit with proper error message if not. (LP: #1460066)
  * If auxverb fails with exit code 126, 127, 254, or 255, consider this a
    failure of auxverb/the testbed itself, not of the program run under it.
    (As specified in doc/README.virtualisation-server.rst) (LP: #1462540)

 -- Martin Pitt <email address hidden> Sat, 06 Jun 2015 13:09:50 +0200

Changed in autopkgtest (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.