Debian stretch HVM guest workarounds
v2 cover Debian stretch HVM guest workarounds
The Debian HVM tests are broken with 32-bit guests, due to bugs and infelicities in stretch. This is blocking things. Fix it. I will push this series to osstest pretest right away.
Ian Jackson (5):
debianhvm tests: Re-permute guest architecture
mg-repro-setup: Allow, and advertise, ^ for unsetting runvars
ts-debian-hvm-install: Use ---, and no longer duplicate $gconsole
ts-debian-hvm-install: Disable net.ifnames for Debian HVM guests
Debian: Work around Debian stretch bug with disk device names
Osstest/Debian.pm | 19 +++++++++++++++++++ make-flight | 11 ++++++++--- mg-repro-setup | 8 +++++--- ts-debian-hvm-install | 14 ++++++++++---- 4 files changed, 42 insertions(+), 10 deletions(-)
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 1/5 debianhvm tests: Re-permute guest architecture
Firstly, change the smoke flight to use amd64, not i386. Secondly, make the other flights have a mixture of i386 and amd64, not just amd64.
It was always wrong to test only one guest architecture in the main flights.
The context for changing the smoke flight is that there seems to be a problem affecting Debian i386 guests. This is rather a nuisance but it is not a Xen regression so we probably want to do an amd64 guest instead so we have some HVM tests in the smoke flights.
Checked with standalone-generate-dump-flight-runvars. Differences are as follows:
1. Generally, to change the guest arch from amd64 to i386 in:
test-amd64-amd64-xl-qemut-debianhvm-{amd64,i386}-xsm test-amd64-amd64-xl-qemuu-debianhvm-{amd64,i386}-xsm test-amd64-i386-xl-qemut-debianhvm-{amd64,i386}-xsm test-amd64-i386-xl-qemuu-debianhvm-{amd64,i386}-xsm
This occurs in all the usual flights.
2. To change the guest arch from i386 to amd64 in:
xen-unstable-smoke test-amd64-amd64-xl-qemuu-debianhvm-i386
In all cases, this implies a variety of changes to runvars, including the ISO to be used, the install timeout, etc.
Usually I would introduce new jobs first, and then, after an overlap, remove old ones. But the regression, due to the i386 hvm stretch problem, is already with us.
I expect this change to unblock the xen-unstable-smoke flights by dropping the failing job and replacing it with a passing one.
The other flights will now start to fail, though. I will need, separately, to develop a workaround for the stretch i386 hvm guest bug.
--- make-flight | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
make-flight +8 -3
@@ -115,7 +115,7 @@ job_create_test_filter_callback () { test-amd64-amd64-libvirt) return 0 ;; test-armhf-armhf-xl) return 0 ;; test-arm64-arm64-xl-xsm) return 0 ;; - test-amd64-amd64-xl-qemuu-debianhvm-i386) return 0 ;; + test-amd64-amd64-xl-qemuu-debianhvm-amd64) return 0 ;; *) return 1 ;; esac ;;
@@ -352,8 +352,13 @@ do_hvm_debian_nested_tests () { branch_debianhvm_arch () { case $branch in - xen-unstable-smoke) echo i386;; - *) echo amd64;; + xen-unstable-smoke) echo amd64;; + *) + stripy debianhvm_arch amd64 i386 \ + "$xsm" true \ + "$toolstack" xl \ + "$stubdom" '' + echo $debianhvm_arch;; esac }
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 2/5 mg-repro-setup: Allow, and advertise, ^ for unsetting runvars
In reply to Ian JacksonThis avoids any possible problems with shells misinterpreting ! and is consistent with the other recent changes replacing ! for negation with ^.
--- mg-repro-setup | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
mg-repro-setup +5 -3
@@ -37,7 +37,7 @@ usage () { cat <<END --rogue bypass queuing system and allocate now --capture do not suppress log capture -r<var>=<value> set runvar - -r!<var> delete runvar + -r^<var> delete runvar -B<blessing> default is 'play' -E... -f... -P as for mg-execute-flight --autoalloc-nofree allocate hosts as for production, but keep them
@@ -77,7 +77,9 @@ while true; do --capture) skipcapture=false ;; --autoalloc-nofree) autoalloc=true ;; -l*) logfile=${arg#-l} ;; - -r!*) adjustsets+=("${arg#-r}") ;; + -r^*|-r!*) adjustsets+=("${arg#-r}") ;; + # ^ two patterns because there's no way in bash to write + # a glob character class which matches exactly ^ or ! -r*=*) adjustsets+=("${arg#-r}") ;; --) break ;; *) badusage ;;
@@ -105,7 +107,7 @@ adjrunvar () { for arg in "${adjustsets[@]}"; do case "$arg" in - !*) delrunvar "${arg#!}" ;; + !*|^*) delrunvar "${arg#?}" ;; *=*) adjrunvar "${arg%%=*}" "{$arg#*=}" ;; *) bad-adjuistset-pattern ;; esac
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 3/5 ts-debian-hvm-install: Use ---, and no longer duplicate $gconsole
In reply to Ian JacksonIn October 2014, debian-installer was updated to honour ---' in the way it previously honoured --': #762007. If we use that instead, we don't need to duplicate $gconsole any more.
This, effectively, reverts
db26f5825a21269d9218417a9ca40bc5d47755d2
ts-host-install: include console before *and* after the -- marker.
In principle this ought to be changed only in "recent enough" Debian suites, but certainly at least jessie has the fix and jessie is quite broken now, so let's not bother with making it conditional.
--- ts-debian-hvm-install | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
ts-debian-hvm-install +2 -4
@@ -124,7 +124,6 @@ sub gcmdline (;$) { my @dicmdline = (); my $gconsole = "console=ttyS0,115200n8"; - push @dicmdline, $gconsole; push @dicmdline, di_installcmdline_core($gho, '/preseed.cfg', PreseedScheme => 'file'); push @dicmdline, $extra if $extra;
@@ -132,9 +131,8 @@ sub gcmdline (;$) { my $append = target_var($gho,'linux_boot_append'); push @dicmdline, $append if $append; - push @dicmdline, "--"; - # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762007 for - # why console= is repeated. + push @dicmdline, "---"; + push @dicmdline, $gconsole; return join(" ", @dicmdline);
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 4/5 ts-debian-hvm-install: Disable net.ifnames for Debian HVM guests
In reply to Ian Jackson--- ts-debian-hvm-install | 8 ++++++++ 1 file changed, 8 insertions(+)
ts-debian-hvm-install +8 -0
@@ -135,6 +135,14 @@ sub gcmdline (;$) { push @dicmdline, $gconsole; + # https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ + # In fact these are anything but predictable. In Debian i386 + # stretch, we end up using the emulated NIC in the installer but + # the Xen PV VIF in the installed system. We want these both to + # be eth0, which is what happens if we turn off the new scheme and + # take no further special measures. + push @dicmdline, 'net.ifnames=0'; + return join(" ", @dicmdline); }
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 5/5 Debian: Work around Debian stretch bug with disk device names
In reply to Ian JacksonThe Debian stretch i386 installer does not have Xen PV-on-HVM drivers. When we run the HVM guest installer, it therefore sees /dev/sda (the emulated IDE). But the booted system *has* the drivers and sees /dev/xvda.
The Debian installer is supposed to put UUID= in the bootloader config and so on in the installed system. However, this does not work due to a bug (Debian #852323). Work around it.
--- Osstest/Debian.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
Osstest/Debian.pm +19 -0
@@ -893,6 +893,23 @@ END preseed_ssh($ho, $sfx); + if ($suite =~ m/stretch/) { + # Debian #852323. On stretch i386 HVM the disk device is sda + # in the installer environment and xvda in the installed + # system. This isn't supposed to matter because the installed + # system is supposed to have root=UUID=... in its grub.cfg, + # but due to a bug the relevant udev rules are not rerun + # between the fs block dev getting its uuid and running + # grub install. Rerun the udev rules here. In a moment + # we will retrigger the update-grub... + preseed_hook_command($ho, 'late_command', '', <<'END'); +#!/bin/sh +set -ex + +udevadm trigger +END + } + preseed_hook_command($ho, 'late_command', '', <<'END'); #!/bin/sh set -ex
@@ -902,6 +919,8 @@ if [ -f /target$grub ] ; then in-target sed -i \ 's/^\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)\bquiet\b\(.*"\)$/\1\2/g' \ $grub + # needed for the removal of "quiet" to take effect but + # also to pick up the #852323 workaround (see above). in-target update-grub fi END
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel