Various usability issues with adt-buildvm-ubuntu-cloud

Bug #1466486 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...
285.0/286.5 MB (100%)
Download successful.
Resizing image, adding 4G...
Image resized.
Building seed image...
Traceback (most recent call last):
  File "/usr/bin/adt-buildvm-ubuntu-cloud", line 325, in <module>
    args.metadata, args.userdata, args.post_command)
  File "/usr/bin/adt-buildvm-ubuntu-cloud", line 249, in build_seed
    cwd=workdir)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1459, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'genisoimage'

Similar to bug 1460066, it would be nice if I discovered this before downloading the image, or the downloaded image were cached so I didn't have to download it again.

Second, on retry I get:

Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
qemu failed with status 1

...because I didn't belong to the kvm group.

My workflow often involves running autopkgtest on a fresh VM, so I hit these kinds of things often. Maybe a image download cache is the only real solution that will work, rather than trying to manage each thing individually?

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: autopkgtest 3.14.3
ProcVersionSignature: User Name 3.19.0-20.20-generic 3.19.8
Uname: Linux 3.19.0-20-generic x86_64
ApportVersion: 2.17.3-0ubuntu4
Architecture: amd64
Date: Thu Jun 18 12:26:51 2015
Ec2AMI: ami-00000413
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.large
Ec2Kernel: aki-00000002
Ec2Ramdisk: ari-00000002
PackageArchitecture: all
SourcePackage: autopkgtest
UpgradeStatus: No upgrade log present (probably fresh install)

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

Maintaining a cache is a lot of effort which by itself can go wrong. You regularly need to prune the cache, and images there would only last for a day anyway. E. g. ~/.cache/ubuntuimages is a great example how not to do it, it keeps growing and cluttering your disk.

I'll add checks for /dev/kvm and genisoimage, thanks!

Changed in autopkgtest (Ubuntu):
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Low
Revision history for this message
Martin Pitt (pitti) wrote :

I now added both checks, and fixed another bug. I ran adt-buildvm-ubuntu-cloud in a minimal VM and confirm that it doesn't download the image in vain now. (Side note: nice to see that nested QEMU works reasonably well!)

Changed in autopkgtest (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: In Progress → Fix Committed
Revision history for this message
Robie Basak (racb) wrote : Re: [Bug 1466486] Re: Various usability issues with adt-buildvm-ubuntu-cloud

Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.15.1

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

  * adt-buildvm-ubuntu-cloud: Fix lsb_release fallback if python3-distro-info
    is not available.
  * adt-buildvm-ubuntu-cloud: Don't move the uninitialized image to final
    location if QEMU failed.
  * adt-buildvm-ubuntu-cloud: Check availability of genisoimage and access of
    /dev/kvm before downloading image. (LP: #1466486)
  * Get along with dpkg-query not existing, such as in latest Ubuntu Snappy
    images. Skip generation of testbed-packages artifact in that case.
    (LP: #1469647)
  * Adjust NullRunner.test_tmp_install test case to work with pygobject 3.16.

 -- Martin Pitt <email address hidden> Mon, 29 Jun 2015 13:07:34 +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.