All of lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job
@ 2015-05-13  3:36 longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 1/9] Parsing grub which has 'submenu' primitive longtao.pang
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

This patch set adds nested HVM test case for osstest.
In this test case, a Xen hypervisor (L1) runs on top of another Xen 
hypervisor (L0). 
Upon L1 hypervisor, we will then create a nested guest (L2), and test if the 
Linux guest can then be installed and run well.
About nested Xen virtualization, 
refer to http://wiki.xenproject.org/wiki/Nested_Virtualization_in_Xen.

Test steps
        0. To run osstest in standalone mode, write a config file in
           '~/.xen-osstest/config', and then create a standalone.config file 
           to define 'TREE_LINUX', 'REVISION_LINUX' which will be used for
           nested test. The directory path of 'Debian ISO Images' which used
           for installing HVM guest VM could be defined in 
           '~/.xen-osstest/config'. 
        1. run './standalone-reset' to generate standalone.db firstly then run 
           'build-amd64' job and then 'build-amd64-pvops', to prepare xen
           installation tarball and hvm guest kernel.
        2. run 'test-amd64-amd6-qemuu-nested' job, it does following:
                a. invoke test step of 'ts-debain-hvm-install' to install 
                   a normal HVM guest
                b. invoke test step of 'ts-nested-setup' to make some
                   appropriate runvars which selecthost() would recognise and
                   prepare the configurations for installing L2 guest VM. 
                c. invoke test step of 'ts-xen-install' to install xen on 
                   the normal guest, alter it into a L1 hypervisor
                d. invoke test step of 'ts-debain-hvm-install' again, but 
                   take the L1 hypervisor as host, install the L2 guest on it
                e. invoke test step of 'ts-guest-stop', stop L2 guest.
                f. invoke test step of 'ts-guest-destroy' to destroy L1 guest.

This patch set reuse 'ts-debian-hvm-install' for both L1 installation
and L2 installation, use 'nestedl1' as L1's guestname and identity 
and use 'nestedl2 as L2's guestname.
It also reuses 'ts-xen-install' with L1's identity 'nestedl1' input parameter 
to differentiate from L0 Xen installation.
This patch series has been tested on test machines of amd64 arch,
Debian-7.2.0-amd64 as guests OS, with hvm domain0 of Linux kernel 3.18.5, 
in standalone mode.
Also, we use linux-stable tree as domain0 kernel source.
----------------------------------------------------------------
longtao.pang (9):
      parsing grub which has 'submenu' primitive
      Changes to support '/boot' leading paths of kernel, xen, in grub
      Refactor installation of overlays for guest used
      Edit some APIs in TestSupport.pm for nested test
      Move the codes about memory size setting into prep()
      Changes on test step of Debian hvm guest install
      Add new script to customize nested test configuration
      Compose the main recipe of nested test job
      Add test job for nest test case

 Osstest/Debian.pm      |   22 +++++++++++++++-----
 Osstest/TestSupport.pm |   27 +++++++++++++++----------
 make-flight            |   32 ++++++++++++++++++++++++++++++
 sg-run-job             |   11 ++++++++++
 ts-debian-hvm-install  |   37 ++++++++++++++++++++++------------
 ts-nested-setup        |   64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 165 insertions(+), 28 deletions(-)
 create mode 100755 ts-nested-setup

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 1/9] Parsing grub which has 'submenu' primitive
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 2/9] Changes to support '/boot' leading paths of kernel, xen, in grub longtao.pang
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

>From a hvm kernel build from Linux stable Kernel tree,
the auto generated grub2 menu will have 'submenu' primitive, upon the
'menuentry' items. Xen boot entries will be grouped into a submenu. This
patch adds capability to support such grub formats.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/Debian.pm |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 4476af5..3a1a515 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -407,10 +407,18 @@ sub setupboot_grub2 ($$$$) {
     
         my $count= 0;
         my $entry;
+        my $submenu;
         while (<$f>) {
             next if m/^\s*\#/ || !m/\S/;
             if (m/^\s*\}\s*$/) {
-                die unless $entry;
+                die unless $entry || $submenu;
+                if(!defined $entry && defined $submenu){
+                    logm("Met end of a submenu starting from ".
+                        "$submenu->{StartLine}. ".
+                        "Our want kern is $want_kernver");
+                    $submenu=undef;
+                    next;
+                }
                 my (@missing) =
                     grep { !defined $entry->{$_} } 
 		        (defined $xenhopt
@@ -441,6 +449,9 @@ sub setupboot_grub2 ($$$$) {
                 $entry= { Title => $1, StartLine => $., Number => $count };
                 $count++;
             }
+            if (m/^submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) {
+                $submenu={ StartLine =>$.};
+            }
             if (m/^\s*multiboot\s*\/(xen\-[0-9][-+.0-9a-z]*\S+)/) {
                 die unless $entry;
                 $entry->{Hv}= $1;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 2/9] Changes to support '/boot' leading paths of kernel, xen, in grub
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 1/9] Parsing grub which has 'submenu' primitive longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays longtao.pang
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

Support situations of grub that have vmlinuz and other things starting
with path of '/boot' rather than '/'.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/Debian.pm |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 3a1a515..3baacc4 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -452,21 +452,21 @@ sub setupboot_grub2 ($$$$) {
             if (m/^submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) {
                 $submenu={ StartLine =>$.};
             }
-            if (m/^\s*multiboot\s*\/(xen\-[0-9][-+.0-9a-z]*\S+)/) {
+            if (m/^\s*multiboot\s*(?:\/boot)?\/(xen\S+)/) {
                 die unless $entry;
                 $entry->{Hv}= $1;
             }
-            if (m/^\s*multiboot\s*\/(vmlinu[xz]-(\S+))/) {
+            if (m/^\s*multiboot\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))/) {
                 die unless $entry;
                 $entry->{KernOnly}= $1;
                 $entry->{KernVer}= $2;
             }
-            if (m/^\s*module\s*\/(vmlinu[xz]-(\S+))/) {
+            if (m/^\s*module\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))/) {
                 die unless $entry;
                 $entry->{KernDom0}= $1;
                 $entry->{KernVer}= $2;
             }
-            if (m/^\s*module\s*\/(initrd\S+)/) {
+            if (m/^\s*module\s*(?:\/boot)?\/(initrd\S+)/) {
                 $entry->{Initrd}= $1;
             }
 	    if (m/^\s*module\s*\/(xenpolicy\S+)/) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 1/9] Parsing grub which has 'submenu' primitive longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 2/9] Changes to support '/boot' leading paths of kernel, xen, in grub longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-14 10:59   ` Ian Campbell
  2015-05-20 13:17   ` Ian Campbell
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 4/9] Edit some APIs in TestSupport.pm for nested test longtao.pang
                   ` (6 subsequent siblings)
  9 siblings, 2 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

Apply overlay to guests as well as hosts by moving to preseed_base.

We do this because we want to be able to:
       * Use '/etc/init.d/osstest-confirm-booted' for guests as 
         well as hosts (in particular when testing nestedhvm
         we sometimes want to treat a guest as a host).
       * Use grub's 20_linux_xen which is harmless unless Xen is
         installed in the guest which is the case only for
         nestedhvm testing when we want these changes.
The other things in the overlay are some initscripts
(xenbridge and xenlightdaemons) which are not enabled for guests and
hence are therefore harmless.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
---
Based on Ian Campbell's v6_patch [04,05,06], I create this patch
to refactor installation of overlays for guest as well as host used.

Link of Ian Campbell's patch:
http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00467.html
http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00452.html
http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00459.html
---
 Osstest/Debian.pm |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 3baacc4..d65f41c 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -630,6 +630,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
@@ -766,8 +767,6 @@ ls -l /dev/sd*
 true
 END
 
-    preseed_hook_overlay($ho, $sfx, 'overlay', 'overlay.tar');
-
     preseed_hook_command($ho, 'late_command', $sfx, <<END);
 #!/bin/sh
 set -ex
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 4/9] Edit some APIs in TestSupport.pm for nested test
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
                   ` (2 preceding siblings ...)
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 5/9] Move the code for setting memory size into prep() longtao.pang
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

1. If vif model is defined for guest, use it in guest's configuration
2. In L2 installation context, its host (L1) shall not have a static IP
but stored in runvar in L1 installation before; use this stored runvar
IP.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/TestSupport.pm |   28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 3f84110..955bea3 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -888,13 +888,17 @@ sub selecthost ($) {
     serial_host_setup($ho);
 
     $ho->{IpStatic} = get_host_property($ho,'ip-addr');
-    if (!defined $ho->{IpStatic}) {
-	my $ip_packed= gethostbyname($ho->{Fqdn});
-	die "$ho->{Fqdn} ?" unless $ip_packed;
-	$ho->{IpStatic}= inet_ntoa($ip_packed);
-	die "$ho->{Fqdn} ?" unless defined $ho->{IpStatic};
+    if (defined $r{"${ident}_ip"}) {
+        $ho->{Ip} = $r{"${ident}_ip"};
+    } else {
+        if (!defined $ho->{IpStatic}) {
+	    my $ip_packed= gethostbyname($ho->{Fqdn});
+	    die "$ho->{Fqdn} ?" unless $ip_packed;
+	    $ho->{IpStatic}= inet_ntoa($ip_packed);
+	    die "$ho->{Fqdn} ?" unless defined $ho->{IpStatic};
+        }
+        $ho->{Ip}= $ho->{IpStatic};
     }
-    $ho->{Ip}= $ho->{IpStatic};
 
     #----- tftp -----
 
@@ -1537,13 +1541,15 @@ sub prepareguest ($$$$$$) {
     store_runvar("${gn}_tcpcheckport", $tcpcheckport);
     store_runvar("${gn}_boot_timeout", $boot_timeout);
 
+    my $gho= selectguest($gn, $ho);
+    store_runvar("${gn}_domname", $gho->{Name});
+
+    # If we have defined guest specific disksize, use it
+    $mb = guest_var($gho,'disksize',$mb);
     if (defined $mb) {
 	store_runvar("${gn}_disk_lv", $r{"${gn}_hostname"}.'-disk');
     }
 
-    my $gho= selectguest($gn, $ho);
-    store_runvar("${gn}_domname", $gho->{Name});
-
     if (defined $mb) {
 	store_runvar("${gn}_vg", '');
 	if (!length $r{"${gn}_vg"}) {
@@ -1571,11 +1577,13 @@ sub prepareguest_part_xencfg ($$$$$) {
     my $oncrash= $xopts->{OnCrash} || 'preserve';
     my $vcpus= guest_var($gho, 'vcpus', $xopts->{DefVcpus} || 2);
     my $xoptcfg= $xopts->{ExtraConfig};
+    my $vif= guest_var($gho, 'vifmodel','');
+    my $vifmodel= $vif ? ",model=$vif" : '';
     $xoptcfg='' unless defined $xoptcfg;
     my $xencfg= <<END;
 name        = '$gho->{Name}'
 memory = ${ram_mb}
-vif         = [ 'type=ioemu,mac=$gho->{Ether}' ]
+vif         = [ 'type=ioemu,mac=$gho->{Ether}${vifmodel}' ]
 #
 on_poweroff = '$onpoweroff'
 on_reboot   = '$onreboot'
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 5/9] Move the code for setting memory size into prep()
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
                   ` (3 preceding siblings ...)
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 4/9] Edit some APIs in TestSupport.pm for nested test longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install longtao.pang
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

Move the code for setting memory size from outside into prep(),
where these $ram_mb operations are only used; And in next patch,
for L2 guest installation, $ram_mb will be overridden by a runvar value,
which needs $gho in scope.

This is pure code motion. No functional change.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 ts-debian-hvm-install |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index b37f0f9..d3413e1 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -156,6 +156,18 @@ sub prep () {
     target_putfilecontents_root_stash($ho, 10, preseed(),
                                       $preseed_file_path);
 
+    # If host has >8G free memory, create a guest with 4G memory to catch
+    # any error that triggers cross 4G boundary
+    my $host_freemem_mb = host_get_free_memory($ho);
+    my $ram_minslop = 100;
+    my $ram_lots = 5000;
+    if ($host_freemem_mb > $ram_lots * 2 + $ram_minslop) {
+        $ram_mb = $ram_lots;
+    } else {
+        $ram_mb = 768;
+    }
+    logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB");
+
     more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
                           OnReboot => 'preserve',
                           Bios => $r{bios},
@@ -173,18 +185,6 @@ sub prep () {
     });
 }
 
-# If host has >8G free memory, create a guest with 4G memory to catch
-# any error that triggers cross 4G boundary
-my $host_freemem_mb = host_get_free_memory($ho);
-my $ram_minslop = 100;
-my $ram_lots = 5000;
-if ($host_freemem_mb > $ram_lots * 2 + $ram_minslop) {
-    $ram_mb = $ram_lots;
-} else {
-    $ram_mb = 768;
-}
-logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB");
-
 if (!$stage) {
     prep();
     guest_create($gho);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
                   ` (4 preceding siblings ...)
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 5/9] Move the code for setting memory size into prep() longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-20 13:23   ` Ian Campbell
  2015-05-20 13:55   ` Ian Campbell
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 7/9] Add new script to customize nested test configuration longtao.pang
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

1. The default disk size for guest is '10000M' which is not sufficient
for nested HVM guest, using larger disk size for nested guest
to accommodate to nested test requirement, the specific disk_size is
defined by make-flight.
2. Since 'Debain-xxx-.iso' image will be stored in rootfs of L1 guest,
therefore needs more disk capacity, increase root partition size to
10000M.
3. In L1 installation context, assign more memory (defined in runvar) to
it; Since it acts as a nested hypervisor anyway.
4. Comment out CDROM entry in sources.list to make HTTP URL entry
available for L1 hvm guest.
5. Enable nestedhvm feature in 'ExtraConfig' for nested job.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
---
Changes in v10:
Based on Ian's v6_patch[04,05,06], use 'preseed_hook_command' to comment out 
CDROM entry in sources.list to make HTTP URL entry available for hvm guest.
---
 ts-debian-hvm-install |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index d3413e1..e636b1e 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -59,7 +59,7 @@ d-i partman-auto/expert_recipe string \\
                         use_filesystem{ } filesystem{ vfat } \\
                         mountpoint{ /boot/efi } \\
                 . \\
-                5000 50 5000 ext4 \\
+                10000 50 10000 ext4 \\
                         method{ format } format{ } \\
                         use_filesystem{ } filesystem{ ext4 } \\
                         mountpoint{ / } \\
@@ -80,6 +80,8 @@ if [ -e \$b/debian/grubx64.efi ] ; then
     mkdir -p \$b/boot
     cp \$b/debian/grubx64.efi \$b/boot/bootx64.efi
 fi
+
+in-target sed -i 's/^deb *cdrom/#&/g' /etc/apt/sources.list
 END
 
     $preseed_file .= preseed_hook_cmds();
@@ -156,6 +158,10 @@ sub prep () {
     target_putfilecontents_root_stash($ho, 10, preseed(),
                                       $preseed_file_path);
 
+    my $extra_config='';
+    $extra_config .="nestedhvm=1\n"
+        if guest_var($gho,"enable_nestedhvm",'false') eq 'true';
+
     # If host has >8G free memory, create a guest with 4G memory to catch
     # any error that triggers cross 4G boundary
     my $host_freemem_mb = host_get_free_memory($ho);
@@ -164,13 +170,19 @@ sub prep () {
     if ($host_freemem_mb > $ram_lots * 2 + $ram_minslop) {
         $ram_mb = $ram_lots;
     } else {
-        $ram_mb = 768;
+        # Use guest_var to get specific memsize, or will use default '768'
+        $ram_mb= guest_var($gho,'memsize',768);
     }
-    logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB");
+    logm("Host has $host_freemem_mb MB free memory,
+         setting guest memory size to $ram_mb MB");
+
+    # Use guest_var to get specific disk size, or will use default $disk_mb
+    $disk_mb= guest_var($gho,'disksize',$disk_mb);
 
     more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
                           OnReboot => 'preserve',
                           Bios => $r{bios},
+                          ExtraConfig => $extra_config,
                           PostImageHook => sub {
         my $cmds = iso_copy_content_from_image($gho, $newiso);
         $cmds .= prepare_initrd($initrddir,$newiso,$preseed_file_path);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 7/9] Add new script to customize nested test configuration
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
                   ` (5 preceding siblings ...)
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-20 13:28   ` Ian Campbell
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 8/9] Compose the main recipe of nested test job longtao.pang
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

1. In this script, make some appropriate runvars which selecthost would
recognise.
2. Prepare the configurations for installing L2 guest VM.
3. Create a lv disk in L0 and hot-attach it to L1; Inside L1, using this
new added disk to create a VG which will be used for installing L2 guest.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
---
Changes in v10:
1. Since Ian has fixed the bug of 'late_command' in his v6_patch, remove
the code for editing 'sources.list' file in hvm guest.
2. Currently, reboot is not required after block attach 'lvdev' to L1;
So, remove the related code.
3. Assert "$guest_storage_lv_size" is defined, otherwise die.
4. Assert toolstack is 'xl', otherwise die.
---
 ts-nested-setup |   73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100755 ts-nested-setup

diff --git a/ts-nested-setup b/ts-nested-setup
new file mode 100755
index 0000000..308a142
--- /dev/null
+++ b/ts-nested-setup
@@ -0,0 +1,73 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2015 Intel Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict qw(vars);
+use DBI;
+use Osstest;
+use Osstest::Debian;
+use Osstest::TestSupport;
+
+tsreadconfig();
+# Pass L0's ident and L1's guestname
+our ($l0_ident,$l1_gn) = @ARGV;
+our ($l0,$l1) = ts_get_host_guest($l0_ident,$l1_gn);
+
+guest_check_ip($l1);
+
+# L1 guest's ident is same as guestname
+our $l1_ident = $l1->{Guest};
+
+store_runvar($l1_ident,$l1->{Guest});
+store_runvar("${l1_ident}_ip",$l1->{Ip});
+
+target_cmd_root($l1, "update-rc.d osstest-confirm-booted start 99 2 .");
+
+target_install_packages_norec($l1, qw(lvm2 rsync genisoimage));
+
+# We need to attach an extra disk to the L1 guest to be used as L2
+# guest storage.
+#
+# When running in a nested HVM environment the L1 domain is acting
+# as both a guest to L0 and a host to L2 guests and therefore potentially
+# sees connections to two independent xenstore instances, one provided by
+# the L0 host and one which is provided by the L1 instance of xenstore.
+#
+# Unfortunately the kernel is not capable of dealing with this and is only
+# able to cope with a single xenstore connection. Since the L1 toolstack and
+# L2 guests absolutely require xenstore to function we therefore cannot use
+# the L0 xenstore and therefore cannot use PV devices (xvdX etc) in the L1
+# guest and must use emulated devices (sdX etc).
+#
+# However at the moment we have not yet rebooted L1 into Xen and so it does
+# have PV devices available and sdb actually appears as xvdb. We could
+# disable the Xen platform device and use emulated devices for the install
+# phase too but that would be needlessly slow.
+
+my $vgname = $l1->{Vg};
+my $guest_storage_lv_name = "${l1_ident}_guest_storage";
+my $guest_storage_lv_size = guest_var($l1,'guest_storage_size',undef);
+die "guest_storage_lv_size is undefined" unless $guest_storage_lv_size;
+my $guest_storage_lvdev = "/dev/${vgname}/${guest_storage_lv_name}";
+
+die "toolstack $r{toolstack}" unless $r{toolstack} eq "xl";
+target_cmd_root($l0, <<END);
+    lvremove -f $guest_storage_lvdev ||:
+    lvcreate -L ${guest_storage_lv_size}M -n $guest_storage_lv_name $vgname
+    dd if=/dev/zero of=$guest_storage_lvdev count=10
+    xl block-attach $l1->{Name} ${guest_storage_lvdev},raw,sdb,rw
+END
+
+# Create a vg in L1 guest and vg name is ${l1_gn}-disk
+target_cmd_root($l1, "pvcreate /dev/xvdb && vgcreate ${l1_gn}-disk /dev/xvdb");
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 8/9] Compose the main recipe of nested test job
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
                   ` (6 preceding siblings ...)
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 7/9] Add new script to customize nested test configuration longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 9/9] Add test job for nest test case longtao.pang
  2015-05-20 15:39 ` [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job Ian Campbell
  9 siblings, 0 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

The ident and guestname are same of 'nestedl1' for L1 guest VM.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 sg-run-job |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sg-run-job b/sg-run-job
index eae159d..b19f9f9 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -299,6 +299,17 @@ proc run-job/test-pair {} {
 #    run-ts . remus-failover ts-remus-check         src_host dst_host + debian
 }
 
+proc need-hosts/test-nested {} {return host}
+proc run-job/test-nested {} {
+    run-ts . = ts-debian-hvm-install + host + nestedl1
+    run-ts . = ts-nested-setup + host + nestedl1
+    run-ts . = ts-xen-install nestedl1
+    run-ts . = ts-host-reboot nestedl1
+    run-ts . = ts-debian-hvm-install nestedl1 nestedl2
+    run-ts . = ts-guest-stop nestedl1 nestedl2
+    run-ts . = ts-guest-destroy + host + nestedl1
+}
+
 proc test-guest-migr {g} {
     if {[catch { run-ts . = ts-migrate-support-check + host $g }]} return
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [OSSTEST Nested PATCH v10 9/9] Add test job for nest test case
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
                   ` (7 preceding siblings ...)
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 8/9] Compose the main recipe of nested test job longtao.pang
@ 2015-05-13  3:36 ` longtao.pang
  2015-05-20 15:39 ` [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job Ian Campbell
  9 siblings, 0 replies; 24+ messages in thread
From: longtao.pang @ 2015-05-13  3:36 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, longtaox.pang, Ian.Jackson, Ian.Campbell, robert.hu

1. This patch adds creation of the nested test job, when job creation
procedure is invoked.
2. Set nested L1's vif model, nestedhvm feature, set specific disk
size and memory size for nested test by make-flight.

Signed-off-by: longtao.pang <longtaox.pang@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 make-flight |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/make-flight b/make-flight
index 70c1900..976fece 100755
--- a/make-flight
+++ b/make-flight
@@ -204,6 +204,36 @@ do_hvm_win7_x64_tests () {
             all_hostflags=$most_hostflags,hvm
 }
 
+do_hvm_debian_nested_tests () {
+  bios=$1
+
+  if [ $xenarch != amd64 -o $dom0arch != amd64 \
+      -o "x$qemuu_suffix" != "x-qemuu" ]; then
+    return
+  fi
+
+  case $xenbranch in
+    xen-3.*-testing)      return;;
+    xen-4.0-testing)      return;;
+    xen-4.1-testing)      return;;
+    xen-4.2-testing)      return;;
+    xen-4.3-testing)      return;;
+  esac
+
+  job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-nested \
+            test-nested xl $xenarch $dom0arch $qemuu_runvar \
+            nestedl1_image=debian-7.2.0-amd64-CD-1.iso \
+            nestedl1_vifmodel='e1000' \
+            nestedl1_disksize='15000' \
+            nestedl1_memsize='3072' \
+            nestedl1_enable_nestedhvm='true' \
+            nestedl1_guest_storage_size='20000' \
+            nestedl2_image=debian-7.2.0-amd64-CD-1.iso \
+            nestedl2_disksize='15000' \
+            bios=$bios
+            all_hostflags=$most_hostflags,hvm
+}
+
 do_hvm_debian_test_one () {
   testname=$1
   bios=$2
@@ -408,6 +438,7 @@ test_matrix_do_one () {
     do_hvm_rhel6_tests
 
     do_hvm_debian_tests
+    do_hvm_debian_nested_tests seabios
 
   done # qemuu_suffix
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays longtao.pang
@ 2015-05-14 10:59   ` Ian Campbell
  2015-05-18  9:52     ` Ian Campbell
  2015-05-20 13:17   ` Ian Campbell
  1 sibling, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2015-05-14 10:59 UTC (permalink / raw)
  To: longtao.pang; +Cc: wei.liu2, robert.hu, Ian.Jackson, xen-devel

On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> Based on Ian Campbell's v6_patch [04,05,06], I create this patch
> to refactor installation of overlays for guest as well as host used.
> 
> Link of Ian Campbell's patch:
> http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00467.html
> http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00452.html
> http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00459.html

FYI I've just pushed these to osstest's pretest branch where they will
be tested and appear in production hopefully tomorrow if all goes well.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays
  2015-05-14 10:59   ` Ian Campbell
@ 2015-05-18  9:52     ` Ian Campbell
  2015-05-18 12:21       ` Robert Hu
  0 siblings, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2015-05-18  9:52 UTC (permalink / raw)
  To: longtao.pang; +Cc: robert.hu, wei.liu2, Ian.Jackson, xen-devel

On Thu, 2015-05-14 at 11:59 +0100, Ian Campbell wrote:
> On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> > Based on Ian Campbell's v6_patch [04,05,06], I create this patch
> > to refactor installation of overlays for guest as well as host used.
> > 
> > Link of Ian Campbell's patch:
> > http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00467.html
> > http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00452.html
> > http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00459.html
> 
> FYI I've just pushed these to osstest's pretest branch where they will
> be tested and appear in production hopefully tomorrow if all goes well.

These have passed into the production osstest branch now.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays
  2015-05-18  9:52     ` Ian Campbell
@ 2015-05-18 12:21       ` Robert Hu
  0 siblings, 0 replies; 24+ messages in thread
From: Robert Hu @ 2015-05-18 12:21 UTC (permalink / raw)
  To: Ian Campbell; +Cc: robert.hu, longtao.pang, wei.liu2, Ian.Jackson, xen-devel

On Mon, 2015-05-18 at 10:52 +0100, Ian Campbell wrote:
> On Thu, 2015-05-14 at 11:59 +0100, Ian Campbell wrote:
> > On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> > > Based on Ian Campbell's v6_patch [04,05,06], I create this patch
> > > to refactor installation of overlays for guest as well as host used.
> > > 
> > > Link of Ian Campbell's patch:
> > > http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00467.html
> > > http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00452.html
> > > http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00459.html
> > 
> > FYI I've just pushed these to osstest's pretest branch where they will
> > be tested and appear in production hopefully tomorrow if all goes well.
> 
> These have passed into the production osstest branch now.
Great!
> 
> Ian.
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays longtao.pang
  2015-05-14 10:59   ` Ian Campbell
@ 2015-05-20 13:17   ` Ian Campbell
  1 sibling, 0 replies; 24+ messages in thread
From: Ian Campbell @ 2015-05-20 13:17 UTC (permalink / raw)
  To: longtao.pang; +Cc: wei.liu2, robert.hu, Ian.Jackson, xen-devel

On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> Apply overlay to guests as well as hosts by moving to preseed_base.
> 
> We do this because we want to be able to:
>        * Use '/etc/init.d/osstest-confirm-booted' for guests as 
>          well as hosts (in particular when testing nestedhvm
>          we sometimes want to treat a guest as a host).
>        * Use grub's 20_linux_xen which is harmless unless Xen is
>          installed in the guest which is the case only for
>          nestedhvm testing when we want these changes.
> The other things in the overlay are some initscripts
> (xenbridge and xenlightdaemons) which are not enabled for guests and
> hence are therefore harmless.
> 
> Signed-off-by: longtao.pang <longtaox.pang@intel.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install longtao.pang
@ 2015-05-20 13:23   ` Ian Campbell
  2015-05-20 13:55   ` Ian Campbell
  1 sibling, 0 replies; 24+ messages in thread
From: Ian Campbell @ 2015-05-20 13:23 UTC (permalink / raw)
  To: longtao.pang; +Cc: wei.liu2, robert.hu, Ian.Jackson, xen-devel

On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> 1. The default disk size for guest is '10000M' which is not sufficient
> for nested HVM guest, using larger disk size for nested guest
> to accommodate to nested test requirement, the specific disk_size is
> defined by make-flight.
> 2. Since 'Debain-xxx-.iso' image will be stored in rootfs of L1 guest,
> therefore needs more disk capacity, increase root partition size to
> 10000M.
> 3. In L1 installation context, assign more memory (defined in runvar) to
> it; Since it acts as a nested hypervisor anyway.
> 4. Comment out CDROM entry in sources.list to make HTTP URL entry
> available for L1 hvm guest.
> 5. Enable nestedhvm feature in 'ExtraConfig' for nested job.
> 
> Signed-off-by: longtao.pang <longtaox.pang@intel.com>
> ---
> Changes in v10:
> Based on Ian's v6_patch[04,05,06], use 'preseed_hook_command' to comment out 
> CDROM entry in sources.list to make HTTP URL entry available for hvm guest.
> ---
>  ts-debian-hvm-install |   18 +++++++++++++++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
> index d3413e1..e636b1e 100755
> --- a/ts-debian-hvm-install
> +++ b/ts-debian-hvm-install
> @@ -59,7 +59,7 @@ d-i partman-auto/expert_recipe string \\
>                          use_filesystem{ } filesystem{ vfat } \\
>                          mountpoint{ /boot/efi } \\
>                  . \\
> -                5000 50 5000 ext4 \\
> +                10000 50 10000 ext4 \\
>                          method{ format } format{ } \\
>                          use_filesystem{ } filesystem{ ext4 } \\
>                          mountpoint{ / } \\
> @@ -80,6 +80,8 @@ if [ -e \$b/debian/grubx64.efi ] ; then
>      mkdir -p \$b/boot
>      cp \$b/debian/grubx64.efi \$b/boot/bootx64.efi
>  fi
> +
> +in-target sed -i 's/^deb *cdrom/#&/g' /etc/apt/sources.list

In the current osstest production this is at the end of:

preseed_hook_command($gho, 'late_command', '', <<END) if $gsuite =~ /wheezy/;

i.e. it is only done on wheezy (since it is a workaround for a Debian
specific issue).

So you need to add another use of preseed_hook_command to add your new
command.

> @@ -164,13 +170,19 @@ sub prep () {
>      if ($host_freemem_mb > $ram_lots * 2 + $ram_minslop) {
>          $ram_mb = $ram_lots;
>      } else {
> -        $ram_mb = 768;
> +        # Use guest_var to get specific memsize, or will use default '768'
> +        $ram_mb= guest_var($gho,'memsize',768);
>      }
> -    logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB");
> +    logm("Host has $host_freemem_mb MB free memory,
> +         setting guest memory size to $ram_mb MB");

I'm not sure what this will output, but I expect it has far too many
spaces between "," and "setting".

e.g. 
print("AAA
       BBB");
produces:
AAA
       BBB

I think you need to close and reopen the quotes and paste the two
together with . or, better, just leave the log message unwrapped
(wrapping also breaks grep...).

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 7/9] Add new script to customize nested test configuration
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 7/9] Add new script to customize nested test configuration longtao.pang
@ 2015-05-20 13:28   ` Ian Campbell
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Campbell @ 2015-05-20 13:28 UTC (permalink / raw)
  To: longtao.pang; +Cc: wei.liu2, robert.hu, Ian.Jackson, xen-devel

On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> 1. In this script, make some appropriate runvars which selecthost would
> recognise.
> 2. Prepare the configurations for installing L2 guest VM.
> 3. Create a lv disk in L0 and hot-attach it to L1; Inside L1, using this
> new added disk to create a VG which will be used for installing L2 guest.
> 
> Signed-off-by: longtao.pang <longtaox.pang@intel.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install longtao.pang
  2015-05-20 13:23   ` Ian Campbell
@ 2015-05-20 13:55   ` Ian Campbell
  2015-05-26  8:53     ` Pang, LongtaoX
  1 sibling, 1 reply; 24+ messages in thread
From: Ian Campbell @ 2015-05-20 13:55 UTC (permalink / raw)
  To: longtao.pang; +Cc: wei.liu2, robert.hu, Ian.Jackson, xen-devel

On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> @@ -59,7 +59,7 @@ d-i partman-auto/expert_recipe string \\
>                          use_filesystem{ } filesystem{ vfat } \\
>                          mountpoint{ /boot/efi } \\
>                  . \\
> -                5000 50 5000 ext4 \\
> +                10000 50 10000 ext4 \\

These three numbers are

<limits>::=<minimal size>_<priority>_<maximal size>_<parted fs>

(from
http://anonscm.debian.org/cgit/d-i/debian-installer.git/tree/doc/devel/partman-auto-recipe.txt)

So here you are increasing the minimum size of the root partition for
all debianhvm domains (including non-nested ones and L2 guests) from 5G
to 10G.

Did you test this with a normal L1 debianhvm guest (not one destined to
be an L1 host). i.e. using test-amd64-amd64-xl-qemuu-debianhvm-amd64 ?

The new size you have given is the same size as the entire disk in that
case. I'm not sure what will then happen...

Perhaps "5000 50 -1 ext4" does what you need, namely leaves the minimum
alone and sets the maximum to unlimited, which I think will end up
making this partition as big as the disk less the configured swap space.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job
  2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
                   ` (8 preceding siblings ...)
  2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 9/9] Add test job for nest test case longtao.pang
@ 2015-05-20 15:39 ` Ian Campbell
  2015-05-21  6:56   ` Robert Hu
  2015-05-21  9:25   ` Pang, LongtaoX
  9 siblings, 2 replies; 24+ messages in thread
From: Ian Campbell @ 2015-05-20 15:39 UTC (permalink / raw)
  To: longtao.pang; +Cc: wei.liu2, robert.hu, Ian.Jackson, xen-devel

On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
>       parsing grub which has 'submenu' primitive
>       Changes to support '/boot' leading paths of kernel, xen, in grub
>       Refactor installation of overlays for guest used
>       Edit some APIs in TestSupport.pm for nested test
>       Move the codes about memory size setting into prep()

I've pushed the patches up to here into the osstest pretest branch from
where it will be tested before becoming the production version of
osstest.

The next patch had a couple of comments which is why I stopped here.
Also it is useful to let refactoring type stuff go through in a flight
of its own.

I made a couple of mods as I applied:

In the first patch I adjusted an "if(stuff){" into "if (stuff) {"

In the fourth patch I had to resolve a conflict with the newly added
${viftype} code. Since I was there I also made ${vifmodel} a prefixing
thing like ${viftype} is for consistency.

I also included my "grub: remove patch to disable submenu from
20_linux_xen overlay" patch since it shouldn't be needed after your
first change.

I've pushed the resulting branch to:
        git://xenbits.xen.org/people/ianc/osstest.git
        nestedhvm-v10-pretest

since you can't see it otherwise. If the tests don't pass for some
reason we may need to rewind and try again, in which case you'll want to
start with those versions.

Test reports for osstest's own gate only go to Ian and myself, I'll copy
the list and you as necessary, otherwise keep an eye on
http://xenbits.xen.org/gitweb/?p=osstest.git;a=summary for your stuff
showing up in master in a day or two.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job
  2015-05-20 15:39 ` [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job Ian Campbell
@ 2015-05-21  6:56   ` Robert Hu
  2015-05-21  8:42     ` Ian Campbell
  2015-05-21  9:25   ` Pang, LongtaoX
  1 sibling, 1 reply; 24+ messages in thread
From: Robert Hu @ 2015-05-21  6:56 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, longtao.pang, robert.hu, Ian.Jackson, xen-devel

On Wed, 2015-05-20 at 16:39 +0100, Ian Campbell wrote:
> On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> >       parsing grub which has 'submenu' primitive
> >       Changes to support '/boot' leading paths of kernel, xen, in grub
> >       Refactor installation of overlays for guest used
> >       Edit some APIs in TestSupport.pm for nested test
> >       Move the codes about memory size setting into prep()
> 
> I've pushed the patches up to here into the osstest pretest branch from
> where it will be tested before becoming the production version of
> osstest.
> 
> The next patch had a couple of comments which is why I stopped here.
> Also it is useful to let refactoring type stuff go through in a flight
> of its own.
> 
> I made a couple of mods as I applied:
> 
> In the first patch I adjusted an "if(stuff){" into "if (stuff) {"
> 
> In the fourth patch I had to resolve a conflict with the newly added
> ${viftype} code. Since I was there I also made ${vifmodel} a prefixing
> thing like ${viftype} is for consistency.
> 
> I also included my "grub: remove patch to disable submenu from
> 20_linux_xen overlay" patch since it shouldn't be needed after your
> first change.
> 
> I've pushed the resulting branch to:
>         git://xenbits.xen.org/people/ianc/osstest.git
>         nestedhvm-v10-pretest
> 
> since you can't see it otherwise. If the tests don't pass for some
> reason we may need to rewind and try again, in which case you'll want to
> start with those versions.
Thanks Ian for your kindly review/modification and other helps.
I've checked that branch and see those of our patches your pushed.
So with regarding to our next(v11) patch:
1. shall we still include these patches you already pushed or not?
2. shall we based on this git://xenbits.xen.org/people/ianc/osstest.git
        nestedhvm-v10-pretest branch 
or 
	git://xenbits.xen.org/osstest.git master branch?
> 
> Test reports for osstest's own gate only go to Ian and myself, I'll copy
> the list and you as necessary, otherwise keep an eye on
> http://xenbits.xen.org/gitweb/?p=osstest.git;a=summary for your stuff
> showing up in master in a day or two.
> 
> Ian.
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job
  2015-05-21  6:56   ` Robert Hu
@ 2015-05-21  8:42     ` Ian Campbell
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Campbell @ 2015-05-21  8:42 UTC (permalink / raw)
  To: robert.hu; +Cc: wei.liu2, longtao.pang, Ian.Jackson, xen-devel

On Thu, 2015-05-21 at 14:56 +0800, Robert Hu wrote:
> On Wed, 2015-05-20 at 16:39 +0100, Ian Campbell wrote:
> > On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> > >       parsing grub which has 'submenu' primitive
> > >       Changes to support '/boot' leading paths of kernel, xen, in grub
> > >       Refactor installation of overlays for guest used
> > >       Edit some APIs in TestSupport.pm for nested test
> > >       Move the codes about memory size setting into prep()
> > 
> > I've pushed the patches up to here into the osstest pretest branch from
> > where it will be tested before becoming the production version of
> > osstest.
> > 
> > The next patch had a couple of comments which is why I stopped here.
> > Also it is useful to let refactoring type stuff go through in a flight
> > of its own.
> > 
> > I made a couple of mods as I applied:
> > 
> > In the first patch I adjusted an "if(stuff){" into "if (stuff) {"
> > 
> > In the fourth patch I had to resolve a conflict with the newly added
> > ${viftype} code. Since I was there I also made ${vifmodel} a prefixing
> > thing like ${viftype} is for consistency.

I managed to introduce a typo here "vidmodel". I've fixed and repushed
both my xenbits branch and osstest's pretest.

(Ian: I didn't kill the inprogress flight since it is actually doing a
baseline test of the bisector stuff you pushed yesterday and not yet
testing the stuff in this batch).

> > I also included my "grub: remove patch to disable submenu from
> > 20_linux_xen overlay" patch since it shouldn't be needed after your
> > first change.
> > 
> > I've pushed the resulting branch to:
> >         git://xenbits.xen.org/people/ianc/osstest.git
> >         nestedhvm-v10-pretest
> > 
> > since you can't see it otherwise. If the tests don't pass for some
> > reason we may need to rewind and try again, in which case you'll want to
> > start with those versions.
> Thanks Ian for your kindly review/modification and other helps.
> I've checked that branch and see those of our patches your pushed.
> So with regarding to our next(v11) patch:
> 1. shall we still include these patches you already pushed or not?

It depends on whether they pass the push gate or not.

Until we have an actual result lets assume they will and therefore not
include these patches.

> 2. shall we based on this git://xenbits.xen.org/people/ianc/osstest.git
>         nestedhvm-v10-pretest branch 
> or 
> 	git://xenbits.xen.org/osstest.git master branch?

Since you are not including those patches you will want to use
nestedhvm-v10-pretest, remember to repull with the typo fixed though.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job
  2015-05-20 15:39 ` [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job Ian Campbell
  2015-05-21  6:56   ` Robert Hu
@ 2015-05-21  9:25   ` Pang, LongtaoX
  2015-05-21  9:32     ` Ian Campbell
  1 sibling, 1 reply; 24+ messages in thread
From: Pang, LongtaoX @ 2015-05-21  9:25 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, Hu, Robert, Ian.Jackson, xen-devel



> -----Original Message-----
> From: Ian Campbell [mailto:ian.campbell@citrix.com]
> Sent: Wednesday, May 20, 2015 11:39 PM
> To: Pang, LongtaoX
> Cc: xen-devel@lists.xen.org; Ian.Jackson@eu.citrix.com; wei.liu2@citrix.com; Hu,
> Robert
> Subject: Re: [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job
> 
> On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> >       parsing grub which has 'submenu' primitive
> >       Changes to support '/boot' leading paths of kernel, xen, in grub
> >       Refactor installation of overlays for guest used
> >       Edit some APIs in TestSupport.pm for nested test
> >       Move the codes about memory size setting into prep()
> 
> I've pushed the patches up to here into the osstest pretest branch from
> where it will be tested before becoming the production version of
> osstest.
> 
> The next patch had a couple of comments which is why I stopped here.
> Also it is useful to let refactoring type stuff go through in a flight
> of its own.
> 
> I made a couple of mods as I applied:
> 
> In the first patch I adjusted an "if(stuff){" into "if (stuff) {"
> 
> In the fourth patch I had to resolve a conflict with the newly added
> ${viftype} code. Since I was there I also made ${vifmodel} a prefixing
> thing like ${viftype} is for consistency.
> 
I have git clone osstest source from 'git://xenbits.xen.org/people/ianc/osstest.git', 
checkout ' nestedhvm-v10-pretest' branch. Is it a typo in 'Osstest/TestSupport.pm' or not?
vif         = [ '${viftype}${vidmodel}mac=$gho->{Ether}' ]
I think it should be:
vif         = [ '${viftype}${vifmodel}mac=$gho->{Ether}' ]

> I also included my "grub: remove patch to disable submenu from
> 20_linux_xen overlay" patch since it shouldn't be needed after your
> first change.
> 
> I've pushed the resulting branch to:
>         git://xenbits.xen.org/people/ianc/osstest.git
>         nestedhvm-v10-pretest
> 
> since you can't see it otherwise. If the tests don't pass for some
> reason we may need to rewind and try again, in which case you'll want to
> start with those versions.
> 
> Test reports for osstest's own gate only go to Ian and myself, I'll copy
> the list and you as necessary, otherwise keep an eye on
> http://xenbits.xen.org/gitweb/?p=osstest.git;a=summary for your stuff
> showing up in master in a day or two.
> 
> Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job
  2015-05-21  9:25   ` Pang, LongtaoX
@ 2015-05-21  9:32     ` Ian Campbell
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Campbell @ 2015-05-21  9:32 UTC (permalink / raw)
  To: Pang, LongtaoX; +Cc: wei.liu2, Hu, Robert, Ian.Jackson, xen-devel

On Thu, 2015-05-21 at 09:25 +0000, Pang, LongtaoX wrote:
> I have git clone osstest source from 'git://xenbits.xen.org/people/ianc/osstest.git', 
> checkout ' nestedhvm-v10-pretest' branch. Is it a typo in 'Osstest/TestSupport.pm' or not?
> vif         = [ '${viftype}${vidmodel}mac=$gho->{Ether}' ]
> I think it should be:
> vif         = [ '${viftype}${vifmodel}mac=$gho->{Ether}' ]

Yes, I pushed a fix a short time ago and posted in this thread.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install
  2015-05-20 13:55   ` Ian Campbell
@ 2015-05-26  8:53     ` Pang, LongtaoX
  2015-05-26  9:00       ` Ian Campbell
  0 siblings, 1 reply; 24+ messages in thread
From: Pang, LongtaoX @ 2015-05-26  8:53 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, Hu, Robert, Ian.Jackson, xen-devel



> -----Original Message-----
> From: Ian Campbell [mailto:ian.campbell@citrix.com]
> Sent: Wednesday, May 20, 2015 9:56 PM
> To: Pang, LongtaoX
> Cc: xen-devel@lists.xen.org; Ian.Jackson@eu.citrix.com; wei.liu2@citrix.com; Hu,
> Robert
> Subject: Re: [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm
> guest install
> 
> On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> > @@ -59,7 +59,7 @@ d-i partman-auto/expert_recipe string \\
> >                          use_filesystem{ } filesystem{ vfat } \\
> >                          mountpoint{ /boot/efi } \\
> >                  . \\
> > -                5000 50 5000 ext4 \\
> > +                10000 50 10000 ext4 \\
> 
> These three numbers are
> 
> <limits>::=<minimal size>_<priority>_<maximal size>_<parted fs>
> 
> (from
> http://anonscm.debian.org/cgit/d-i/debian-installer.git/tree/doc/devel/partman-a
> uto-recipe.txt)
> 
> So here you are increasing the minimum size of the root partition for
> all debianhvm domains (including non-nested ones and L2 guests) from 5G
> to 10G.
> 
> Did you test this with a normal L1 debianhvm guest (not one destined to
> be an L1 host). i.e. using test-amd64-amd64-xl-qemuu-debianhvm-amd64 ?
> 
> The new size you have given is the same size as the entire disk in that
> case. I'm not sure what will then happen...
> 
> Perhaps "5000 50 -1 ext4" does what you need, namely leaves the minimum
> alone and sets the maximum to unlimited, which I think will end up
> making this partition as big as the disk less the configured swap space.
> 
> Ian.
I have ever used 'Debian-7.6.0-amd64-DVD-1.iso' as debianhvm_image which is 3.7G. 
At that time, it's necessary to extend L1 guest's rootf size to '10000' to store the image.
Currently, I use 'Debian-7.2.0-amd64-CD-1.iso' as debianhvm_image which is just 624M,
the origin rootfs size of '5000' is sufficient to store this image and I have tried that it works fine for nested job.
So, it's no need to extend guest's rootfs size anymore.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install
  2015-05-26  8:53     ` Pang, LongtaoX
@ 2015-05-26  9:00       ` Ian Campbell
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Campbell @ 2015-05-26  9:00 UTC (permalink / raw)
  To: Pang, LongtaoX; +Cc: wei.liu2, Hu, Robert, Ian.Jackson, xen-devel

On Tue, 2015-05-26 at 08:53 +0000, Pang, LongtaoX wrote:
> 
> 
> > -----Original Message-----
> > From: Ian Campbell [mailto:ian.campbell@citrix.com]
> > Sent: Wednesday, May 20, 2015 9:56 PM
> > To: Pang, LongtaoX
> > Cc: xen-devel@lists.xen.org; Ian.Jackson@eu.citrix.com; wei.liu2@citrix.com; Hu,
> > Robert
> > Subject: Re: [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm
> > guest install
> > 
> > On Wed, 2015-05-13 at 11:36 +0800, longtao.pang wrote:
> > > @@ -59,7 +59,7 @@ d-i partman-auto/expert_recipe string \\
> > >                          use_filesystem{ } filesystem{ vfat } \\
> > >                          mountpoint{ /boot/efi } \\
> > >                  . \\
> > > -                5000 50 5000 ext4 \\
> > > +                10000 50 10000 ext4 \\
> > 
> > These three numbers are
> > 
> > <limits>::=<minimal size>_<priority>_<maximal size>_<parted fs>
> > 
> > (from
> > http://anonscm.debian.org/cgit/d-i/debian-installer.git/tree/doc/devel/partman-a
> > uto-recipe.txt)
> > 
> > So here you are increasing the minimum size of the root partition for
> > all debianhvm domains (including non-nested ones and L2 guests) from 5G
> > to 10G.
> > 
> > Did you test this with a normal L1 debianhvm guest (not one destined to
> > be an L1 host). i.e. using test-amd64-amd64-xl-qemuu-debianhvm-amd64 ?
> > 
> > The new size you have given is the same size as the entire disk in that
> > case. I'm not sure what will then happen...
> > 
> > Perhaps "5000 50 -1 ext4" does what you need, namely leaves the minimum
> > alone and sets the maximum to unlimited, which I think will end up
> > making this partition as big as the disk less the configured swap space.
> > 
> > Ian.
> I have ever used 'Debian-7.6.0-amd64-DVD-1.iso' as debianhvm_image which is 3.7G. 
> At that time, it's necessary to extend L1 guest's rootf size to '10000' to store the image.
> Currently, I use 'Debian-7.2.0-amd64-CD-1.iso' as debianhvm_image which is just 624M,
> the origin rootfs size of '5000' is sufficient to store this image and I have tried that it works fine for nested job.
> So, it's no need to extend guest's rootfs size anymore.

OK, great, that should simplify things in the series.

Ian.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2015-05-26  9:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13  3:36 [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job longtao.pang
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 1/9] Parsing grub which has 'submenu' primitive longtao.pang
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 2/9] Changes to support '/boot' leading paths of kernel, xen, in grub longtao.pang
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 3/9] Refactor installation of overlays longtao.pang
2015-05-14 10:59   ` Ian Campbell
2015-05-18  9:52     ` Ian Campbell
2015-05-18 12:21       ` Robert Hu
2015-05-20 13:17   ` Ian Campbell
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 4/9] Edit some APIs in TestSupport.pm for nested test longtao.pang
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 5/9] Move the code for setting memory size into prep() longtao.pang
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 6/9] Changes on test step of Debian hvm guest install longtao.pang
2015-05-20 13:23   ` Ian Campbell
2015-05-20 13:55   ` Ian Campbell
2015-05-26  8:53     ` Pang, LongtaoX
2015-05-26  9:00       ` Ian Campbell
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 7/9] Add new script to customize nested test configuration longtao.pang
2015-05-20 13:28   ` Ian Campbell
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 8/9] Compose the main recipe of nested test job longtao.pang
2015-05-13  3:36 ` [OSSTEST Nested PATCH v10 9/9] Add test job for nest test case longtao.pang
2015-05-20 15:39 ` [OSSTEST Nested PATCH v10 0/9] Introduction of netsted HVM test job Ian Campbell
2015-05-21  6:56   ` Robert Hu
2015-05-21  8:42     ` Ian Campbell
2015-05-21  9:25   ` Pang, LongtaoX
2015-05-21  9:32     ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.