Fixes for distros-debian-* flights on armhf
v2 cover Fixes for distros-debian-* flights on armhf
The armhf tests in distros-debian-* have always failed since they did not shutdown at the end of installation. I've now investigated that and the fix is patch #2 in this series.
The remainder of the series consists of various fixes, extensions to existing quirks and workarounds, mainly to the use of the pv-menu-list package on ARM when actually starting the guest (which was previously blocked by the install failure).
In addition to this a xen patch ("libxl: use correct command line for arm guests.") is also needed. That should be applied for 4.6 pretty soon (probably right after I've sent this mail...)
This will fix the armhf tests in distros-debian-jessie flights (and later) but won't fix the armhf -raw/qcow/vhd tests in other flights since they also suffer from lack of Xen support in Wheezy's kernel. Once we switch osstest to using Jessie by default then together with this series those things ought to spring into life.
Ian.
PATCH v2 1/7 ts-logs-capture: Collect /var/log/xen/bootloader.*.log
This is the pygrub debug log.
--- ts-logs-capture | 1 + 1 file changed, 1 insertion(+)
ts-logs-capture +1 -0
@@ -143,6 +143,7 @@ sub fetch_logs_host () { /var/log/xen/xend-debug.log* /var/log/xen/xen-hotplug.log* /var/log/xen/domain-builder-ng.log* + /var/log/xen/bootloader.*.log /var/log/xen/qemu-dm* /var/log/xen/xl*.log /var/log/xen/osstest*
Signature · 1 line
2.1.4
PATCH v2 2/7 ts-debian-di-install: Use exit/poweroff in preference to exit/always_halt
In reply to Ian Campbellalways_halt results in d-i calling "halt", which does not necessarily poweroff the host (it seems to for x86/PV Xen guests, but does not for ARM). Using exit/poweroff calls "poweroff" which is equivalent to "halt -p", doing so results in ARM guests powering off as desired.
--- ts-debian-di-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ts-debian-di-install +1 -1
@@ -210,7 +210,7 @@ END } my @cmdline = (); - push @cmdline, "debian-installer/exit/always_halt=true"; + push @cmdline, "debian-installer/exit/poweroff=true"; push @cmdline, "domain=$c{TestHostDomain}"; push @cmdline, "console=hvc0"; push @cmdline, di_installcmdline_core($gho, $ps_url);
Signature · 1 line
2.1.4
PATCH v2 3/7 ts-debian-di-install: Install pv-grub-menu in ARM guests, always.
In reply to Ian Campbell---
v2: s/pv-menu-lst/pv-grub-menu/
Add note that pvgrub == grub1
Ungarble a comment
--- ts-debian-di-install | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
ts-debian-di-install +12 -1
@@ -190,9 +190,20 @@ END $method_cfg = setup_netboot($tmpdir, $arch, $suite); + # We need the pv-grub-menu package: + # - On x86 when running pvgrub, since pvgrub only speaks grub1 + # menu.lst syntax and grub2 is now the only grub in + # Debian. + # - On ARM, which uses pygrub, because grub2 is not installed + # on ARM by default (except for, maybe, UEFI guests in the + # future, but not today). + # + # NB: "pvgrub" is grub1/grub-legacy, not PV grub2. + my $pvmenulst = ($bl eq "pvgrub" || $arch =~ /arm/); + $ps_url = preseed_create_guest($gho, $arch, '', Suite=>$suite, - PvMenuLst=>($bl eq "pvgrub")); + PvMenuLst=>$pvmenulst); $extra_disk = ""; }
Signature · 1 line
2.1.4
Re: [PATCH OSSTEST v2 3/7] ts-debian-di-install: Install pv-grub-menu in ARM guests, always.
Ian Campbell writes ("[PATCH OSSTEST v2 3/7] ts-debian-di-install: Install pv-grub-menu in ARM guests, always."):
Quoted 1 line
Signed-off-by Ian Campbell <[email protected]>
PATCH v2 4/7 ts-debian-di-install: Use the suite in the default hostname
In reply to Ian CampbellBy appending ".$suite" if the suite is in the runvars.
This is more useful in standalone mode than having everything be "debian".
---
v2: Keep using gn but append the suite if given. Not sure what the
best syntax for that ($x ? ".$x " : "") is. --- ts-debian-di-install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
ts-debian-di-install +3 -1
@@ -66,7 +66,9 @@ our $ho= selecthost($whhost); our $ram_mb= 512; our $disk_mb= 10000; -our $guesthost= "$gn.guest.osstest"; +our $guesthost= $gn. + ($r{"${gn}_suite"} ? ".".$r{"${gn}_suite"} : ""). + ".guest.osstest"; our $gho; sub prep () {
Signature · 1 line
2.1.4
Re: [PATCH OSSTEST v2 4/7] ts-debian-di-install: Use the suite in the default hostname
Ian Campbell writes ("[PATCH OSSTEST v2 4/7] ts-debian-di-install: Use the suite in the default hostname"):
Quoted 4 lines
By appending ".$suite" if the suite is in the runvars.
This is more useful in standalone mode than having everything be "debian".
Quoted 2 lines
v2: Keep using gn but append the suite if given. Not sure what the
best syntax for that ($x ? ".$x " : "") is.
This will do.
Ian.
PATCH v2 5/7 Debian: ARM: only apply no bootloader workaround if xopts{PvMenuLst}
In reply to Ian CampbellThis workaround is only necessary because of how pv-menu-list works, so we should only apply both or neither of them.
This results in a long line and I'm about to add a second workaround to this block, so switch to a regular if block instead of postfixing on the one command. Move the comment inside that block in preparation for other workarounds as well.
---
v2: Add a \n after each &&
--- Osstest/Debian.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
Osstest/Debian.pm +10 -5
@@ -915,15 +915,20 @@ d-i grub-installer/bootdev string /dev/xvda END - # Debian doesn't currently know what bootloader to install in a - # Xen guest on ARM. We install pv-grub-menu above which actually - # does what we need, but the installer doesn't treat that as a - # "bootloader". logm("\$arch is $arch, \$suite is $suite"); - $preseed_file.= (<<END) if $arch =~ /^arm/ && $suite =~ /wheezy|jessie|sid/; + if ($xopts{PvMenuLst} && + $arch =~ /^arm/ && + $suite =~ /wheezy|jessie|sid/ ) { + + # Debian doesn't currently know what bootloader to install in + # a Xen guest on ARM. We install pv-grub-menu above which + # actually does what we need, but the installer doesn't treat + # that as a "bootloader". + $preseed_file.= (<<END); d-i nobootloader/confirmation_common boolean true END + } $preseed_file .= preseed_hook_cmds();
Signature · 1 line
2.1.4
Re: [PATCH OSSTEST v2 5/7] Debian: ARM: only apply no bootloader workaround if xopts{PvMenuLst}
Ian Campbell writes ("[PATCH OSSTEST v2 5/7] Debian: ARM: only apply no bootloader workaround if xopts{PvMenuLst}"):
Quoted 1 line
This workaround is only necessary because of how pv-menu-list works,
^^^^^^^^^^^^
pv-grub-menu.
Ian.
PATCH v2 6/7 Debian: ARM has no bootloader (for Xen) even in Stretch.
In reply to Ian CampbellRealistically this isn't going to change until we have either u-boot or UEFI in an arm32 guest.
--- Osstest/Debian.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/Debian.pm +1 -1
@@ -918,7 +918,7 @@ END logm("\$arch is $arch, \$suite is $suite"); if ($xopts{PvMenuLst} && $arch =~ /^arm/ && - $suite =~ /wheezy|jessie|sid/ ) { + $suite =~ /wheezy|jessie|stretch|sid/ ) { # Debian doesn't currently know what bootloader to install in # a Xen guest on ARM. We install pv-grub-menu above which
Signature · 1 line
2.1.4
PATCH v2 7/7 Debian: Create /boot/boot -> . symlink on ARM when PvMenuLst enabled
In reply to Ian CampbellThis is under the same conditional as the nobootloader confirmation one, since they effectively both stem from the lack of a boot loader and the consequential use of the pv-grub-menu package.
---
v2: Add the second bit of the commit message.
--- Osstest/Debian.pm | 8 ++++++++ 1 file changed, 8 insertions(+)
Osstest/Debian.pm +8 -0
@@ -926,7 +926,15 @@ END # that as a "bootloader". $preseed_file.= (<<END); d-i nobootloader/confirmation_common boolean true +END + # Debian Bug #771949 means that update-menu-list always + # generates a full absolute path to the kernel + initrd, while + # by default the partition layout on ARM has a separate /boot. + preseed_hook_command($ho, 'late_command', $sfx, <<END); +#!/bin/sh +set -ex +ln -s . /target/boot/boot END }
Signature · 1 line
2.1.4
Re: [PATCH OSSTEST v2 7/7] Debian: Create /boot/boot -> . symlink on ARM when PvMenuLst enabled
Quoted 5 lines · Ian Campbell
This is under the same conditional as the nobootloader confirmation one, since they effectively both stem from the lack of a boot loader and the consequential use of the pv-grub-menu package.
Signed-off-by Ian Campbell <[email protected]>
I resent this before you acked v1 (after I explained the condition where this was added).
Since all I did this time was add that explanation to the commit message I will retain that Ack and have therefore pushed this fully acked series to pretest.
Thanks,
Ian