Message ID | 1398681696-2773-10-git-send-email-ian.campbell@citrix.com |
---|---|
State | New |
Headers | show |
Ian Campbell writes ("[PATCH OSSTEST v2 10/15] distros: support booting Debian PV (d-i installed) guests with pvgrub."): > This requires the use of the pv-grub-menu package which is in Jessie onwards. > (it is in wheezy-backports which is the subject of a subsequent flight). > > The bootloader to use is specified via a runvar {Guest}_bootloader. > > Adjust make-distros-flight to use pvgrub for some subset of i386 and amd64 > guests to get coverage. This looks reasonable to me. Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> > - my $blcfg = <<END; > + my $pvgrub = { > + i386 => "/usr/local/lib/xen/boot/pv-grub-x86_32.gz", > + amd64 => "/usr/local/lib/xen/boot/pv-grub-x86_64.gz" > + }; I wonder, though, whether this knowledge about arch name mappings could be combined with that from ts-kernel-build:config_create_config_sh and put in Osstest.pm or somewhere. Ian.
On Fri, 2014-05-02 at 14:03 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 10/15] distros: support booting Debian PV (d-i installed) guests with pvgrub."): > > This requires the use of the pv-grub-menu package which is in Jessie onwards. > > (it is in wheezy-backports which is the subject of a subsequent flight). > > > > The bootloader to use is specified via a runvar {Guest}_bootloader. > > > > Adjust make-distros-flight to use pvgrub for some subset of i386 and amd64 > > guests to get coverage. > > This looks reasonable to me. > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Ta. > > - my $blcfg = <<END; > > + my $pvgrub = { > > + i386 => "/usr/local/lib/xen/boot/pv-grub-x86_32.gz", > > + amd64 => "/usr/local/lib/xen/boot/pv-grub-x86_64.gz" > > + }; > > I wonder, though, whether this knowledge about arch name mappings > could be combined with that from > ts-kernel-build:config_create_config_sh and put in Osstest.pm or > somewhere. As in some sort of Osstest::arch_params{PvGrub}, {LinuxDefconfg}, {LinuxKernelImage} ? I think so.
Ian Campbell writes ("Re: [PATCH OSSTEST v2 10/15] distros: support booting Debian PV (d-i installed) guests with pvgrub."): > On Fri, 2014-05-02 at 14:03 +0100, Ian Jackson wrote: > > > - my $blcfg = <<END; > > > + my $pvgrub = { > > > + i386 => "/usr/local/lib/xen/boot/pv-grub-x86_32.gz", > > > + amd64 => "/usr/local/lib/xen/boot/pv-grub-x86_64.gz" > > > + }; > > > > I wonder, though, whether this knowledge about arch name mappings > > could be combined with that from > > ts-kernel-build:config_create_config_sh and put in Osstest.pm or > > somewhere. > > As in some sort of Osstest::arch_params{PvGrub}, {LinuxDefconfg}, > {LinuxKernelImage} ? > > I think so. I was thinking our %arch_debian2xen = qw(i386 x86_32 amd64 x86_64 armhf armhf); our %arch_xen2debian; $arch_xen2debian{$arch_debian2xen{$_}} = $_ foreach keys %arch_debian2xen; or some such. Then my $xenarch = $arch_debian2xen{$arch}; my $pvgrub = "/usr/local/lib/xen/boot/pv-grub-$xenarch.gz"; Or is that conceptually wrong ? Ian.
On Fri, 2014-05-02 at 15:18 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [PATCH OSSTEST v2 10/15] distros: support booting Debian PV (d-i installed) guests with pvgrub."): > > On Fri, 2014-05-02 at 14:03 +0100, Ian Jackson wrote: > > > > - my $blcfg = <<END; > > > > + my $pvgrub = { > > > > + i386 => "/usr/local/lib/xen/boot/pv-grub-x86_32.gz", > > > > + amd64 => "/usr/local/lib/xen/boot/pv-grub-x86_64.gz" > > > > + }; > > > > > > I wonder, though, whether this knowledge about arch name mappings > > > could be combined with that from > > > ts-kernel-build:config_create_config_sh and put in Osstest.pm or > > > somewhere. > > > > As in some sort of Osstest::arch_params{PvGrub}, {LinuxDefconfg}, > > {LinuxKernelImage} ? > > > > I think so. > > I was thinking > > our %arch_debian2xen = qw(i386 x86_32 > amd64 x86_64 > armhf armhf); > our %arch_xen2debian; > $arch_xen2debian{$arch_debian2xen{$_}} = $_ foreach keys %arch_debian2xen; Wowza! Do we need xen2debian anywhere? Mostly we have a debian thing and need a Xen (or a Linux) thing. > or some such. > > Then > > my $xenarch = $arch_debian2xen{$arch}; > my $pvgrub = "/usr/local/lib/xen/boot/pv-grub-$xenarch.gz"; > > Or is that conceptually wrong ? Not inherently, I don't think. You mean to do the same for $arch_debian2linux for the ts-kernel-build stuff I guess? Ian.
Ian Campbell writes ("Re: [PATCH OSSTEST v2 10/15] distros: support booting Debian PV (d-i installed) guests with pvgrub."): > On Fri, 2014-05-02 at 15:18 +0100, Ian Jackson wrote: > > our %arch_xen2debian; > > $arch_xen2debian{$arch_debian2xen{$_}} = $_ foreach keys %arch_debian2xen; > > Wowza! > > Do we need xen2debian anywhere? Mostly we have a debian thing and need a > Xen (or a Linux) thing. Maybe not. I provided it for completeness :-). > > Then > > my $xenarch = $arch_debian2xen{$arch}; > > my $pvgrub = "/usr/local/lib/xen/boot/pv-grub-$xenarch.gz"; > > Or is that conceptually wrong ? > > Not inherently, I don't think. > > You mean to do the same for $arch_debian2linux for the ts-kernel-build > stuff I guess? Right. Ian.
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 043ab0d..8946ab1 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -508,7 +508,7 @@ sub preseed_create_guest ($$;@) { my $suite= $xopts{Suite} || $c{DebianSuite}; - my $extra_packages; + my $extra_packages = "pv-grub-menu" if $xopts{PvMenuLst}; my $preseed_file= preseed_base($suite, $extra_packages, %xopts); $preseed_file.= (<<END); diff --git a/make-distros-flight b/make-distros-flight index abc24ff..a6e41e0 100755 --- a/make-distros-flight +++ b/make-distros-flight @@ -59,6 +59,21 @@ test_matrix_branch_filter_callback () { } test_do_one_netboot () { + stripy bootloader pygrub pvgrub \ + "$xenarch" "i386" \ + "$dom0arch" "amd64" \ + "$domU" "amd64" \ + "$dist" "sid" + + case ${domU}_${dist} in + armhf_*) bootloader="pygrub";; # no pvgrub for arm + + # Needs a menu.lst, not present in Squeeze+ due to switch to grub2, + # workedaround in Jessie+ with pv-grub-menu package. + *_squeeze) bootloader="pygrub";; + *_wheezy) bootloader="pygrub";; + esac + job_create_test test-$xenarch$kern-$dom0arch-$domU-$dist-netboot \ test-debian-di xl $xenarch $dom0arch \ kernbuildjob=${bfi}build-$dom0arch-$kernbuild \ @@ -66,6 +81,7 @@ test_do_one_netboot () { debian_dist=$dist \ debian_method=netboot \ debian_diver=current \ + debian_bootloader=$bootloader \ all_hostflags=$most_hostflags } diff --git a/ts-debian-di-install b/ts-debian-di-install index a71a336..5ed15e4 100755 --- a/ts-debian-di-install +++ b/ts-debian-di-install @@ -89,6 +89,8 @@ sub ginstall () { my $arch= $r{"$gho->{Guest}_arch"}; my $method= $r{"$gho->{Guest}_method"}; + my $bl= $r{"$gho->{Guest}_bootloader"}; + target_cmd_root($ho, <<END); rm -rf /root/di mkdir /root/di @@ -105,7 +107,7 @@ END $suite = "sid" if $suite eq "daily"; - $ps_url = preseed_create_guest($gho, '', Suite=>$suite); + $ps_url = preseed_create_guest($gho, '', Suite=>$suite, PvMenuLst=>($bl eq "pvgrub")); $extra_disk = ""; } @@ -149,7 +151,14 @@ END guest_await_shutdown($ho,$gho,2000); guest_destroy($ho,$gho); - my $blcfg = <<END; + my $pvgrub = { + i386 => "/usr/local/lib/xen/boot/pv-grub-x86_32.gz", + amd64 => "/usr/local/lib/xen/boot/pv-grub-x86_64.gz" + }; + my $blcfg = $bl eq "pvgrub" ? <<END : <<END; +kernel = "$pvgrub->{$arch}" +extra = "(hd0,0)/boot/grub/menu.lst" +END bootloader = "pygrub" END
This requires the use of the pv-grub-menu package which is in Jessie onwards. (it is in wheezy-backports which is the subject of a subsequent flight). The bootloader to use is specified via a runvar {Guest}_bootloader. Adjust make-distros-flight to use pvgrub for some subset of i386 and amd64 guests to get coverage. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- Osstest/Debian.pm | 2 +- make-distros-flight | 16 ++++++++++++++++ ts-debian-di-install | 13 +++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-)