Bug#800845: autopkgtest: Add support for nested VMs
On 03/06/2016 04:19 PM, Martin Pitt wrote:
> Christian Seiler [2016-03-04 23:36 +0100]:
>> There's a small bug in the changes you made to my patch: logging.warning
>> should be adtlog.warning. Also, technically you missed a return path in
>> get_cpuflag(), since /proc/cpuinfo could contain no line that starts with
> Indeed, thanks! I made that more robust by always returning  in the
Looks good, haven't tested it though.
>> While test-building I also noticed quite a few lintian informational
>> notices about the manpages (mainly hyphen-used-as-minus-sign)
> Weird, I don't see them here, I just get the ones below and the too
> old Standards-Version.
Ok, I'll send a patch soon, if you can wait with the release for
another hour or so. ;-)
(Btw. I run lintian -L '>=pedantic/wild-guess', so maybe that's
why you don't see them.)
> There's however one issue which I'd like to address before release.
> Adding "update-initramfs -u" to adt-virt-qemu increased the test time
> quite dramatically. The tests/testpkg-simple/ no-op test now takes 28s
> instead of 20s here. I wonder, do we really need this? A reboot
> without an update initrd should not be affected by this: the
> /dev/baseimage node does not exist at all, thus there can't be any
> UUID clash. It only gets added after booting (and rebooting too), so
> having the initrd know about this is not required at all.
> I pushed
> now to fix this. I want to give you a chance to review this before I
> push the red release button, though. :-)
This is wrong. The udev rules do two things:
- /dev/baseimage symlink
If you don't update the initramfs, /dev/baseimage won't exist, true.
But that does NOT mean that the UUID clashes don't happen. From my
experience testing this, the UUID clashes would result in ~50%
the time having /dev/disk/by-uuid/XXX being a symlink to /dev/vdb1
while the other 50% it would be /dev/vda1. Now funnily enough for
mounting the root file system in the initramfs, this doesn't appear
to have any impact whatsoever (not sure why, though, haven'
investigated that), but it definitely _will_ have an impact for any
other file systems. Which means that if you have a test image that
has multiple partitions (which vmdebootstrap doesn't generate, but
the docs of adt-virt-qemu do mention that _any_ VM image should do),
this _will_ break those cases.
What you _could_ do is create a flag file in /run and update the reboot
script to update the initramfs before rebooting if that flag file is
set - that way only if a reboot is needed will the initramfs be updated
and hence you optimize for the common case where that's not needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: OpenPGP digital signature