Your message dated Tue, 01 Nov 2016 21:33:45 +0000
with message-id <[email protected]>
and subject line Bug#842299: fixed in autopkgtest 4.2
has caused the Debian Bug report #842299,
regarding autopkgtest-virt-qemu: attaching base image makes btrfs very confused
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
842299: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842299
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: autopkgtest
Version: 4.1
Severity: normal
Tags: patch
btrfs gets *really* confused if you attach multiple copies of the
same filesystem, because it tracks filesystems by UUID, not by
device node (part of its built-in RAID-equivalent):
<https://btrfs.wiki.kernel.org/index.php/Gotchas#Block-level_copies_of_devices>
In my experiments with a btrfs-based virtual machine, /proc/self/mounts
etc. thought the mounted partitions and subvolumes all came from
/dev/vdb, even though they clearly weren't because only /dev/vda could
have been mounted read/write.
For least-astonishment, the default should perhaps be to *not* provide
the base image as a block device (and tests that need to exercise
nested virtualization can specifically ask for it), but that would be
a behaviour change so I haven't done it in the attached patch.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'),
(500, 'stable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages autopkgtest depends on:
ii apt-utils 1.3.1
ii libdpkg-perl 1.18.10
ii procps 2:3.3.12-2
ii python3 3.5.1-4
ii python3-debian 0.1.29
Versions of packages autopkgtest recommends:
ii autodep8 0.8
Versions of packages autopkgtest suggests:
pn lxc <none>
pn lxd-client <none>
ii qemu-system 1:2.7+dfsg-1
ii qemu-utils 1:2.7+dfsg-1
ii schroot 1.6.10-2+b1
-- no debconf information
>From e5bb6c8d765da5622189f322815b9b92b45ad540 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Wed, 26 Oct 2016 18:02:00 +0100
Subject: [PATCH 2/5] autopkgtest-virt-qemu: add --no-attach-base-image option
btrfs gets *really* confused if you attach multiple copies of the
same filesystem, because it tracks filesystems by UUID, not by
device node (part of its built-in RAID-equivalent):
<https://btrfs.wiki.kernel.org/index.php/Gotchas#Block-level_copies_of_devices>
In my experiments with a btrfs-based virtual machine, /proc/self/mounts
etc. thought the mounted partitions and subvolumes all came from
/dev/vdb, even though they clearly weren't because only /dev/vda could
have been mounted read/write.
For least-astonishment, the default should perhaps be to *not* provide
the base image as a block device (and tests that need to exercise
nested virtualization can specifically ask for it), but that would be
a behaviour change so I haven't done it here.
Signed-off-by: Simon McVittie <[email protected]>
---
virt/autopkgtest-virt-qemu | 9 +++++++++
virt/autopkgtest-virt-qemu.1 | 17 ++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/virt/autopkgtest-virt-qemu b/virt/autopkgtest-virt-qemu
index 0036f2e..bfb8e73 100755
--- a/virt/autopkgtest-virt-qemu
+++ b/virt/autopkgtest-virt-qemu
@@ -89,6 +89,12 @@ def parse_args():
help='Enable debugging output')
parser.add_argument('--qemu-options',
help='Pass through arguments to QEMU command.')
+ parser.add_argument('--attach-base-image', action='store_true',
+ default=True,
+ help='Attach base image as an extra virtual disk')
+ parser.add_argument('--no-attach-base-image', action='store_false',
+ default=True, dest='attach_base_image',
+ help='Attach base image as an extra virtual disk')
parser.add_argument('image', nargs='+',
help='disk image to add to the VM (in order)')
@@ -192,6 +198,9 @@ def login_tty_and_setup_shell():
def setup_baseimage():
'''setup /dev/baseimage in VM'''
+ if not args.attach_base_image:
+ return
+
term = VirtSubproc.get_unix_socket(os.path.join(workdir, 'ttyS1'))
# Setup udev rules for /dev/baseimage; set link_priority to -1024 so
diff --git a/virt/autopkgtest-virt-qemu.1 b/virt/autopkgtest-virt-qemu.1
index 39602b4..a62dde9 100644
--- a/virt/autopkgtest-virt-qemu.1
+++ b/virt/autopkgtest-virt-qemu.1
@@ -26,7 +26,7 @@ does
the given images, but will instead create a temporary overlay for the
primary image, and add all other images as read-only.
-The first image without the overlay is always added as an additional
+By default, the first image without the overlay is added as an additional
read-only hard drive, which will be available for tests as
.IR /dev/baseimage .
This allows tests that require nested VMs to reuse the same image. Be
@@ -35,6 +35,9 @@ aware that
will not be accessible between calling
.B autopkgtest-reboot-prepare
and the next boot, thus make sure to stop accessing it before.
+The
+.B \-\-no\-attach\-base\-image
+command-line option disables this behaviour.
.SH REQUIREMENTS
.B autopkgtest-virt-qemu
@@ -108,6 +111,18 @@ Show boot messages from serial console.
Enable debugging output.
.TP
+.BR \-\-attach\-base\-image ", " \-\-no\-attach\-base\-image
+Enable or disable attaching a read-only copy of the base image (without the
+read/write overlay) for the first disk image as an extra virtual disk, with
+hardware serial number
+.B BASEIMAGE
+and udev rules to create a symbolic link
+.BR /dev/baseimage .
+This allows tests that require nested VMs to reuse the same image, but is
+a very bad idea when using btrfs, which is confused by the duplicate
+filesystem UUIDs.
+
+.TP
.BI "--qemu-options=" arguments
Pass through arguments to QEMU command; e. g. --qemu-options='-readconfig qemu.cfg'
--
2.10.1
--- End Message ---
--- Begin Message ---
Source: autopkgtest
Source-Version: 4.2
We believe that the bug you reported is fixed in the latest version of
autopkgtest, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Martin Pitt <[email protected]> (supplier of updated autopkgtest package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 01 Nov 2016 23:12:55 +0200
Source: autopkgtest
Binary: autopkgtest
Architecture: source all
Version: 4.2
Distribution: unstable
Urgency: medium
Maintainer: Autopkgtest team <[email protected]>
Changed-By: Martin Pitt <[email protected]>
Description:
autopkgtest - automatic as-installed testing for Debian packages
Closes: 842091 842299 842300 842302
Changes:
autopkgtest (4.2) unstable; urgency=medium
.
[ Martin Pitt ]
* ssh: Fix result of tests that break the testbed. (LP: #1630578)
* qemu: Fix user/password login mode without a ttyS1 root shell.
- Concatenate bytes with each other, not a str to a byte.
- Sync/flush console after sending password and ttyS1 shell command, wait
until login is complete before continuing.
- Send password to sudo for ttyS1 shell command, to also work with
password-requiring sudo. (LP: #1630963)
* qemu: Fix reboot in user/password login mode.
* ssh: Add --capability option.
This is useful to run tests which require an isolation level or have
breaks-testbed without a setup script.
* autopkgtest-build-lxd: Ask "lxc profile" for default bridge instead of
/etc/default/lxd-bridge. The latter went away in recent LXD versions, and
"lxc profile show default" also works in earlier versions.
* Make --apt-upgrade consider a "404" error as test failure.
Previously all errors from "apt-get update" were considered temporary
failures, i. e. the setup command always exited with 1. But if we specify
e. g. a nonexisting release from a distro or a PPA, this won't just go
away by itself -- we want the test to actually fail instead of getting
stuck in an eternal "retry on temporary failures" loop.
* schroot: Don't fail on stderr of schroot as long as it succeeds.
(LP: #1637898)
* qemu: Hide detected udev file system properties on /dev/baseimage.
(Closes: #842299)
.
[ Simon McVittie ]
* VirtSubproc: open arbitrary files in binary mode.
* VirtSubproc: if check_exec status is nonzero, include stderr in message.
* qemu: put the shared directory in /run. If the virtual machine's root
filesystem is read-only, we won't be able to create /autopkgtest.
* qemu: Move eofcat into /tmp. This avoids having to write it to /bin, which
might be read-only. Re-create eofcat on every boot for this.
* source_rules_command: log the result we got if it is not as expected
(Closes: #842302)
* Add 'needs-reboot' restriction. This allows tests to be explicit about
needing to reboot the machine, rather than assuming that
'isolation-machine' is enough. It is plumbed into the existing 'reboot'
capability, which is distinct from 'isolation-machine'.
(Closes: #842300)
* Add --setup-commands-boot for commands that must be run at every boot.
This can be used for doing "mount -o remount,rw /" before any dpkg
operation, or transient setup like writing files into /run/.
(Closes: #842091)
Checksums-Sha1:
e96237560b7a9c40a558dbd39a09bfc31d22f8ee 1863 autopkgtest_4.2.dsc
8e35e8de65ab3ef318fe3c10a750440b4e8953dc 170440 autopkgtest_4.2.tar.xz
6cdf92ce5978806172eb94e1f8107fd2dc5ef930 183628 autopkgtest_4.2_all.deb
Checksums-Sha256:
43860107b87563deeda47caa8eabbbedada58fa312ff9928d7c636c452de2ce9 1863
autopkgtest_4.2.dsc
4ff04812a304c34408b2e3525bb97c9f20c958db6c3258313b09bc8e108acf18 170440
autopkgtest_4.2.tar.xz
3176bf26defd0089fdcf25040aa91851f5dcfb14408e81ebfba8615d52b0f7b9 183628
autopkgtest_4.2_all.deb
Files:
019f70cebd7fb0c04ae189e818689b31 1863 devel optional autopkgtest_4.2.dsc
887fd477e1f0e6783eb7fca0cf870db4 170440 devel optional autopkgtest_4.2.tar.xz
11dc8834c5e62bea3a2b7f1fe17f1085 183628 devel optional autopkgtest_4.2_all.deb
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJYGQeZAAoJENFO8V2v4RNHOd8QAJM5eB/Y1MxMRMNUI72AjKQQ
c9fgiaWhqVSGZJqE5ubIu3uBjvpo9okJ0vvxkd7RhATdGHwGfWd5jkCzDVnv7ibC
MIZE/vkCGNNrg4wGrWTOuyoL0RN0wfZS8tddAvmdeZPWldy1Jl7CuPc7PbMjHqkS
2MHu5cWvi4BOiby6aRwkctJ20YwZj6tRGn9JuUtv24p3xj0i79suUQ+Q1d/IEmhX
xu70sVsKHQ2ik+/CXLyR+q37L8E0asQWMXgfgvQK6ryLE05fTiRF6+xdJmnz1nAO
AvefmkzlwFR+nP93DzznUypSUUUm2RpEnq4xgFh6RHSdOkfFBMYoBtIyZZihwaJ+
IvXlthiqlkWVYo2Du9A9G6e940r2JHmzsuOUOBM1BewJar5eCjbCiWvspYJwRGya
W8aV3wmc0PVc0uvzdqPrJRuawYCk73XcmOoRAPuplUj6PegGO6RcPAEWL19dr9+F
4ugMWtuXbKCYEuIk5gXRkp3/u0HK1tzlxSMK3aT+CUQwqpZeFAMBaX6R3cOIpyaQ
7pjbOiJfBfUicEcfqIReqAP+4cSBITVjyYR2w15i45OsfXr4wMgdlGr4HwQJbKXe
YTaZppZ1TIfdznuCXmlwCJ0CUGQRNU2DkYRELN18MkXFNjs+Yu5lEIampQFiVRLv
a2dZy0HBpMQGakWesgJO
=zLq6
-----END PGP SIGNATURE-----
--- End Message ---