adt-setup-vm modifies cloud-init's conffile but doesn't handle dpkg conffile prompts

Bug #1477626 reported by Iain Lane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This

if [ -e "$root/etc/cloud/cloud.cfg" ]; then
    echo 'apt_preserve_sources_list: true' >> "$root/etc/cloud/cloud.cfg"
fi

modifies a conffile, and this

# upgrade, install some necessary packages
chroot "$root" apt-get update
[ "${ADT_SETUP_VM_UPGRADE:-}" = false ] || DEBIAN_FRONTEND=noninteractive chroot "$root" apt-get -y dist-upgrade

updates the system later on. If there's a new cloud-init at this point we get a conffile prompt, as you can see here.

http://jenkins.qa.ubuntu.com/job/wily-adt-setup-testbed/ARCH=i386,label=aldebaran-adt/63/console

This causes the script to bomb out, and eventually resulted in

https://jenkins.qa.ubuntu.com/view/Wily/view/AutoPkgTest/job/wily-adt-udisks2/ARCH=amd64,label=adt/48/console

because -extra- wasn't installed (this happens later on in the script).

I suppose we need to add force-conffoo to dpkg.cfg.d.

Related branches

Iain Lane (laney)
description: updated
Revision history for this message
Dan Watkins (oddbloke) wrote :

You could drop a file in /etc/cloud/cloud.cfg.d, which should avoid the prompt showing up.

Martin Pitt (pitti)
tags: added: autopkgtest-cloud
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk and rolled out to production servers.

http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=c52f778

Changed in autopkgtest (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.16.3

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

  * adt-setup-vm: Use /etc/cloud.cfg.d/ to avoid conffile prompts on upgrades.
    (LP: #1477626)
  * Don't invoke QEMU with -localtime. QEMU defaults to and Linux prefers the
    hw clock in UTC. This avoids large time jumps when doing NTP.
  * adt-setup-vm: Start autopkgtest shell after all other SysV init
    scripts/facilities, to avoid a too early start of tests while boot is
    still in progress.
  * doc/README.package-tests.rst: Use comma separator in examples.
  * VirtSubproc.check_exec(): Actually error out on stderr as documented.
  * adt-virt-ssh: Verify that sudo does not write errors, as that
    interferes with auxverbs and generally is a sign of host mis-configuration
    (typically wrong hostname).
  * ssh-setup-nova: Set hostname to "adt". This avoids overly long host names
    from defaulting to nova instance names (which can be very long).
  * ssh-setup/nova: Fix parsing of IP address from "nova show" to avoid
    tripping over instance names containing "network". (LP: #1481574)
  * Fix error message and code for "invalid test depends" errors.
  * tests/pep8: Ignore E402 ("module level import not at top of file"), as
    that's impossible to satisfy; we have to set sys.path before.
  * ssh-setup/nova: In cleanup(), wait until the instance gets deleted. This
    avoids name collisions and instance quota overflow.
  * adt-run: Always show summary at the end, which is particularly helpful for
    multiple tests. (LP: #1484991)
  * adt-run.1: Clarify that without any logging options adt-run only logs to
    stderr. (LP: #1485661)
  * adt-virt-lxc: If the executed command exits with 255, translate that to
    253 in the auxverb wrapper, as 255 is the exit code for failures of the
    auxverb itself. This avoids considering ordinary test failures as
    temporary testbed failures.
  * adt-run: Show host name, to more easily identify hosts with frequent
    failures.
  * adt-virt-lxc: Always call lxc-stop with --kill, as the containers are not
    precious and normal shutdown might hang.
  * adt-virt-lxc: In cleanup, stop LXC container before removing the shared
    downtmp, to ensure that we always clean up the running container. Also
    don't fail on errors. (LP: #1488879)
  * ssh-setup/nova: Add missing apt sources for -updates/-security
    restricted/multiverse pockets.

 -- Martin Pitt <email address hidden> Thu, 27 Aug 2015 19:54:51 +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.