simplify adt-virt-lxc startup checks

Bug #1273725 reported by Martin Pitt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

Instead of our mad /var/lib/lxc/ poking, run "lxc-attach runlevel" and wait until it switches to 2 (or better, anything else than "unknown" or "S"), and also add a timeout. That's more robust, and also should get us rid of the cloud-init requirement, so that this starts working for more generic containers.

Related branches

Martin Pitt (pitti)
description: updated
Changed in autopkgtest (Ubuntu):
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
description: updated
Martin Pitt (pitti)
Changed in autopkgtest (Ubuntu):
status: Triaged → In Progress
Martin Pitt (pitti)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in autopkgtest (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 2.7

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

  * adt-virt-lxc: Drop all the file-based checks for container bootup, and
    replace with "lxc-attach runlevel" to wait until the container booted to a
    numeric runlevel. This greatly simplifies the logic and drops the
    cloud-init requirement so that this runner is now suitable for Debian or
    debootstrap-based Ubuntu containers. (LP: #1273725)
  * adt-virt-lxc.1: Drop --gain-root in notes/example. It's unnecessary
    (adt-run will install fakeroot if missing) and confusing (as it's not
    related to LXC specifically and otherwise not really used/useful).
  * adt-virt-lxc.1: Add example how to create a Debian container, and some
    cleanup of obsolete commentary.
  * adt-virt-lxc: Add -s/--sudo option to run lxc-* commands through sudo; use
    this option if you run adt-run as normal user, but need to run the
    container itself as root (if you use LXC system-level containers).
    This drops the hardcoded sudo commands and thus the dependency on sudo,
    which is more palatable for Debian. (LP: #1273977)
  * adt-virt-lxc: Add -e shortcut for --ephemeral, as this is an option which
    you pretty much always want.
  * adt-virt-lxc.1: Move more important options to the top.
  * adt-virt-lxc: Stop hardcoding the "ubuntu" suggested normal user; instead,
    call "getent passwd" to detect the first user with uid >= 500. Don't
    advertise suggested-normal-user if none exists.
  * adt-run: Rearrange finalizing options and reading capabilities to happen
    after testbed opening. That allows the testbed to determine its full
    capablities in its open hook.
  * adt-run: Call dpkg-source --before-build for --unbuilt-tree arguments, to
    ensure that patches are applied for "3.0 (quilt)" source trees. This is
    useful to test *-buildpackage source trees where patches don't get
    applied. (LP: #1212208)

 -- Martin Pitt <email address hidden> Fri, 31 Jan 2014 11:14:32 +0100

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.