From: Ian Jackson Subject: Re: [PATCH OSSTEST v2 12/15] distros: support PV guest install from Debian netinst media. Date: Fri, 2 May 2014 15:01:43 +0100 Message-ID: <21347.42311.385765.653968@mariner.uk.xensource.com> References: <1398681672.29700.55.camel@kazak.uk.xensource.com> <1398681696-2773-12-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398681696-2773-12-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("[PATCH OSSTEST v2 12/15] distros: support PV guest install from Debian netinst media."): > The netinst media are iso images containing a base Debian install and some > (image size dependent) additional tasks. > > On x86 the "multiarch" iso flavour contains a Xen capable kernel for both i386 > and amd64 so use that. > > This adds support for two classes of ISO, the CD sized ones which are built > nightly and the DVD sized ones which are built weekly. > > The images are downloaded using jigdo which sources the majority of the data > from a local Debian mirror, for this reason I have not worried about the fact > that the i386 and amd64 tests are downloading the same thing (adding a specific > download job would require finding up to 4GB of scratch space for each flight). > > The ISOs booted using pygrub which can extract the kernel and initrd from a ISO > image. The resulting guests are also booted with pygrub since the pv-grub-menu > package is not available on the ISO images and we have pvgrub coverage from the > netboot tests. > > Signed-off-by: Ian Campbell > --- > Osstest/Debian.pm | 7 +++++-- > make-distros-flight | 22 ++++++++++++++++++++ > ts-debian-di-install | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 84 insertions(+), 2 deletions(-) > > diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm > index ad478ab..b149e8d 100644 > --- a/Osstest/Debian.pm > +++ b/Osstest/Debian.pm > @@ -433,8 +433,6 @@ sub preseed_base ($$;@) { > $extra_packages ||= ''; > > my $preseed= (< -d-i mirror/suite string $suite > - > d-i debian-installer/locale string en_GB > d-i console-keymaps-at/keymap select gb > d-i keyboard-configuration/xkb-keymap string en_GB > @@ -502,6 +500,11 @@ $xopts{ExtraPreseed} > > END > > + # For CDROM the suite is part of the image > + $preseed .= < +d-i mirror/suite string $suite > +END > + > # deb http://ftp.debian.org/debian/ wheezy-backports main > $preseed .= < d-i apt-setup/local0/repository string http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main > diff --git a/make-distros-flight b/make-distros-flight > index 244d582..a679c61 100755 > --- a/make-distros-flight > +++ b/make-distros-flight > @@ -86,6 +86,19 @@ test_do_one_netboot () { > all_hostflags=$most_hostflags > } > > +test_do_one_netinst () { > + # Always pygrub since no pv-grub-menu on CD > + job_create_test test-$xenarch$kern-$dom0arch-$domU-$cd-netinst \ > + test-debian-di xl $xenarch $dom0arch \ > + kernbuildjob=${bfi}build-$dom0arch-$kernbuild \ > + debian_arch=$domU \ > + debian_cd=$cd \ > + debian_method=netinst \ > + debian_bootloader=pygrub \ > + all_hostflags=$most_hostflags > + > +} > + > test_matrix_do_one () { > case ${xenarch} in > amd64) domUarches="amd64 i386";; > @@ -104,6 +117,15 @@ test_matrix_do_one () { > > done > > + for cd in current weekly ; do > + case ${domU}_${dist} in > + armhf_*) continue;; # No iso targets for armhf > + *) ;; > + esac > + > + test_do_one_netinst > + > + done > done > } > > diff --git a/ts-debian-di-install b/ts-debian-di-install > index 5ed15e4..56feee6 100755 > --- a/ts-debian-di-install > +++ b/ts-debian-di-install > @@ -46,6 +46,53 @@ sub prep () { > target_cmd_root($ho, "umount $gho->{Lvdev} ||:"); > } > > +sub setup_netinst($$$) > +{ ... > + # Use the MD5SUMs file as an index > + logm("Fetch index from $baseurl/MD5SUMS"); > + open C, "curl $baseurl/MD5SUMS|" or die "curl: $!"; This needs to be done in a way that has a timeout. I don't know what curl's default is but I think it would be best to arrange to use cmd in TestSupport.pm somehow. (Maybe directly, in which case it needs to be exported.) > + target_cmd_root($ho, < + cd $didir && jigdo-lite --noask $netinst_jigdo > +END Can you indent the script line so this is easier to read ? > + store_runvar("$gho->{Guest}_netinst_jigdo", $netinst_jigdo); > + > + return (< +bootloader = "pygrub" > +bootloader_args = ["--kernel=$props->{IsoPath}/vmlinuz", "--ramdisk=$props->{IsoPath}/initrd.gz"] Could be wrapped. Thanks, Ian.