Bug#842299: autopkgtest-virt-qemu: attaching base image makes btrfs very confused
mpitt at debian.org
Sun Oct 30 15:52:23 UTC 2016
adding Christian to the recipients as the author of the "supply base
image" feature of QEMU and leaving fullquote for his convenience.
Simon McVittie [2016-10-27 21:15 +0100]:
> 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):
> 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.
I wonder if btrfs is the only file system that does this -- if there
is some reason to be sure about that, we could simply not provide the
base image for btrfs as it wouldn't work anyway.
Or perhaps there is some way how the base image could be a bit
obfuscated/hidden from the kernel/udev? (I can't think of any which
are cheap and not an utter/unrelibale hack).
> 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.
I don't think this is widely used yet -- I think Christian's
open-iscsi tests are probably the only ones. I never saw an "official"
Debian/Ubuntu autopkgtest fail due to that, and this feature is
limited to the QEMU runner, which isn't being used on Debian's and
Ubuntu's testing infrastructure.
In other words, I think that providing an option for this and default
to off might be safer and not actually break compatibility
unacceptably hard. IIRC Christian's original patches back then even
did provide this as an option, I just didn't see a reason for it back
then as it's negligible overhead to provide.
Christian, what's your opinion on this?
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the autopkgtest-devel