[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested test configuration




> -----Original Message-----
> From: Ian Campbell [mailto:ian.campbell@xxxxxxxxxx]
> Sent: Tuesday, April 21, 2015 6:40 PM
> To: Pang, LongtaoX
> Cc: xen-devel@xxxxxxxxxxxxx; Ian.Jackson@xxxxxxxxxxxxx; wei.liu2@xxxxxxxxxx; 
> Hu,
> Robert
> Subject: Re: [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested
> test configuration
> > Signed-off-by: longtao.pang <longtaox.pang@xxxxxxxxx>
> > ---
> > Changes in v8:
> > 1. Replace '$nested_host' by '$l1->{Guest}'.
> > ---
> >  ts-nested-setup |   52
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 52 insertions(+)
> >  create mode 100755 ts-nested-setup
> >
> > diff --git a/ts-nested-setup b/ts-nested-setup
> > new file mode 100755
> > index 0000000..41d5e80
> > --- /dev/null
> > +++ b/ts-nested-setup
> > @@ -0,0 +1,52 @@
> > +#!/usr/bin/perl -w
> > +
> > +use strict qw(vars);
> > +use DBI;
> > +use Osstest;
> > +use Osstest::Debian;
> > +use Osstest::TestSupport;
> > +
> > +tsreadconfig();
> > +our ($l0,$l1) = ts_get_host_guest(@ARGV);
> > +
> > +guest_check_ip($l1);
> > +target_cmd_root($l1, "mkdir -p /home/osstest/.ssh && cp
> /root/.ssh/authorized_keys /home/osstest/.ssh/");
> > +my $url =
> $c{WebspaceUrl}.$c{WebspaceCommon}.$l0->{Name}."_".'overlay.tar';
> > +target_cmd_root($l1, <<END);
> > +    wget -O overlay.tar $url
> > +    tar -xf overlay.tar -C /
> > +    rm overlay.tar -f
> > +    update-rc.d osstest-confirm-booted start 99 2 .
> > +END
> 
> I cc'd you on some patches which I think should help avoid this
> duplication.
> 
For this question, I have merged the v5_patches[04,05,06] which you CC'd to me. 
Based on your patches, after finishing installing L1 hvm guest VM with 
'ts-debian-hvm-install' script, I could ssh into L1 guest as 'osstest' user 
without password, that means I will not need to use below code anymore
target_cmd_root($l1, "mkdir -p /home/osstest/.ssh && cp 
/root/.ssh/authorized_keys /home/osstest/.ssh/");

But, inside L1 guest VM, the overly files(osstest-confirm-booted, xenbridge, 
xenlightdaemons ) does not exist at " /etc/init.d" directory. Since 
'ts-host-reboot' script will use 'osstest-confirm-booted' shell script to 
confirm whether L1 guest boot up normally, these overlay files are necessary 
here.
If I add below patch based on your patches, and install L1 hvm guest VM again, 
all the overly files exist in "/etc/init.d" directory inside L1 guest.
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 6691ff6..4af6957 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -624,6 +624,7 @@ sub preseed_base ($$$$;@) {

     preseed_ssh($ho, $sfx);
     preseed_hook_overlay($ho, $sfx, $c{OverlayLocal}, 'overlay-local.tar');
+    preseed_hook_overlay($ho, $sfx, 'overlay', 'overlay.tar');

     my $preseed = <<"END";
 d-i mirror/suite string $suite

Another question, based on your patches, I find that the below commands under ' 
d-i preseed/late_command string \\' do not work anymore in preseed () ' of 
'ts-debian-hvm-install' script. For example, after finishing installing L1 
guest, there is no directory of '/boot/efi/EFI/boot' created and 'sources.list' 
does not be edited by sed inside L1 guest. I think you have verified this, 
maybe something wrong of my test environment to cause the question?
d-i preseed/late_command string \\
        in-target mkdir -p /boot/efi/EFI/boot; \\
        in-target cp /boot/efi/EFI/debian/grubx64.efi 
/boot/efi/EFI/boot/bootx64.efi ;\\
        in-target sed -i 's/^deb *cdrom/#&/g' /etc/apt/sources.list;
END
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.