From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 09/15] distros: add support for installing Debian PV guests via d-i, flight and jobs Date: Fri, 2 May 2014 13:28:20 +0100 Message-ID: <1399033700.32736.89.camel@kazak.uk.xensource.com> References: <1398681672.29700.55.camel@kazak.uk.xensource.com> <1398681696-2773-9-git-send-email-ian.campbell@citrix.com> <21347.34196.718612.133475@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21347.34196.718612.133475@mariner.uk.xensource.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 Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2014-05-02 at 12:46 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 09/15] distros: add support for installing Debian PV guests via d-i, flight and jobs"): > ... > > +if [ x$buildflight = x ]; then > > + > > + if [ "x$BUILD_LVEXTEND_MAX" != x ]; then > > + BUILD_RUNVARS+=" build_lvextend_max=$BUILD_LVEXTEND_MAX " > > + fi > > This has been clone-and-hacked from make-flight and presumably belongs > in mfi-common (perhaps a subroutine defined there). Ack. > ... > > + if ( $di_ver eq "osstest" ) { > ... > > + store_runvar("$gho->{Guest}_netboot_kernel", $netboot_kernel); > > + store_runvar("$gho->{Guest}_netboot_initrd", $netboot_initrd); > > + } else { > ... > > + store_runvar("$gho->{Guest}_netboot_kernel", $netboot_kernel); > > + store_runvar("$gho->{Guest}_netboot_initrd", $netboot_initrd); > > Had you not noticed that you'd written out the store_runvars lines > twice ? The $netboot_foo are local in scope to within the two halves of the if/else. > > + target_cmd_root($ho, < > +rm -rf /root/di > > +mkdir /root/di > > You should put the flight and job in this filename in case of future > host-sharing. Ack. > > + my $cmdline = join(" ", ( > > + "debian-installer/exit/always_halt=true", > > + "--", > > + "console=hvc0", > > + "auto-install/enable=true", > > + "hostname=$gho->{Name}", > > + "domain=$c{TestHostDomain}", > > + "url=$ps_url", > > + "DEBIAN_FRONTEND=text", > > + "netcfg/dhcp_timeout=150", > > + "netcfg/choose_interface=eth0", > > I think you want to use Osstest::Debian::di_installcmdline_core. I think I do too, thanks for the pointer. To what extent are $ho and $gho interchangeable? Is it ok to call e.g. get_host_property on a guest (as that function would do).? > > + my $blcfg = < > +bootloader = "pygrub" > > +END > > I'm not sure why you've broken this out. (I just mention this in case > it's not deliberate.) It saved some refactoring noise in a later patch when I add support for pvgrub. Ian.