Skip to contentSkip to conversation

Test booting hvm guest with empty cdrom drive

PATCH In review Wei Liu 2 participants 6 messages Apr 6, 2016 – Jun 8, 2016

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

v2 cover Test booting hvm guest with empty cdrom drive

This can only go in after the bug is fixed and possibly backported to all the trees we care about. It won't pass osstest self pushgate otherwise.

Wei.

Wei Liu (2):
TestSupport: rename guest_editconfig_nocd to _midinstall Make guest cdrom empty after installation completes

 Osstest/TestSupport.pm | 8 ++++----
 ts-debian-hvm-install  | 7 +------
 ts-redhat-install      | 7 +------
 3 files changed, 6 insertions(+), 16 deletions(-)
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
author
#1 lore raw

PATCH v2 1/2 TestSupport: rename guest_editconfig_nocd to _midinstall

It does more than just replacing the disc in cdrom. It also modifies guest reboot action.

No functional change.

---
 Osstest/TestSupport.pm | 4 ++--
 ts-debian-hvm-install  | 2 +-
 ts-redhat-install      | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
Osstest/TestSupport.pm +2 -2
index 9e6479a..4eb50fa 100644
@@ -119,7 +119,7 @@ BEGIN {
                       iso_create_empty
                       iso_gen_flags_basic
                       iso_copy_content_from_image
-                      guest_editconfig_nocd
+                      guest_editconfig_midinstall
                       host_install_postboot_complete
                       target_core_dump_setup
                       );
@@ -2509,7 +2509,7 @@ sub iso_copy_content_from_image($$) {
 END
 }
 
-sub guest_editconfig_nocd ($$) {
+sub guest_editconfig_midinstall ($$) {
     my ($gho,$emptyiso) = @_;
     guest_editconfig($gho->{Host}, $gho, sub {
         if (m/^\s*disk\s*\=/ .. /\]/) {
ts-debian-hvm-install +1 -1
index 7521d57..f43ea3e 100755
@@ -283,7 +283,7 @@ if ($stage<2) {
     guest_destroy($gho);
 }
 
-guest_editconfig_nocd($gho,$emptyiso);
+guest_editconfig_midinstall($gho,$emptyiso);
 guest_create($gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);
ts-redhat-install +1 -1
index 10da559..64012db 100755
@@ -158,7 +158,7 @@ if ($stage<2) {
     guest_destroy($gho);
 }
 
-guest_editconfig_nocd($gho,$emptyiso);
+guest_editconfig_midinstall($gho,$emptyiso);
 guest_create($gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
author
#2 lore raw

PATCH v2 2/2 Make guest cdrom empty after installation completes

In reply to Wei Liu

Previously an iso image that contains nothing was inserted to cdrom after guest installation had finished.

With this patch we make cdrom really empty. This helps catch bug that prevents booting hvm guest with empty cdrom drive.

Remove empty iso image generation in ts-{debian-hvm,redhat}-install as well.

---
 Osstest/TestSupport.pm | 6 +++---
 ts-debian-hvm-install  | 7 +------
 ts-redhat-install      | 7 +------
 3 files changed, 5 insertions(+), 15 deletions(-)
Osstest/TestSupport.pm +3 -3
index 4eb50fa..791b83d 100644
@@ -2509,11 +2509,11 @@ sub iso_copy_content_from_image($$) {
 END
 }
 
-sub guest_editconfig_midinstall ($$) {
-    my ($gho,$emptyiso) = @_;
+sub guest_editconfig_midinstall ($) {
+    my ($gho) = @_;
     guest_editconfig($gho->{Host}, $gho, sub {
         if (m/^\s*disk\s*\=/ .. /\]/) {
-            s/\Q$gho->{Rimage}\E/$emptyiso/;
+            s/\Q$gho->{Rimage}\E//;
         }
         s/^on_reboot.*/on_reboot='restart'/;
     });
ts-debian-hvm-install +1 -6
index f43ea3e..4650e26 100755
@@ -181,8 +181,6 @@ sub prepare_initrd ($$$) {
 END
 }
 
-our $emptyiso= "/root/$flight.$job.$gn-empty.iso";
-
 sub iso_path ($$) {
     my ($which, $deftail) = @_;
     my $v = guest_var($gho, "iso_$which", "/install.amd/$deftail");
@@ -205,7 +203,6 @@ sub prep () {
 
     my $base = "/root/$flight.$job.$gn-";
     my $newiso= $base . "newiso";
-    my $emptydir= $base . "empty-dir";
     my $initrddir= $base . "initrd-dir";
     my $preseed_file_path = $base . "preseed";
 
@@ -213,8 +210,6 @@ sub prep () {
                           -no-emul-boot
                           -r);
 
-    iso_create_empty($ho, $emptyiso, $emptydir);
-
     my $extra_config = '';
     $extra_config .= "nestedhvm=1\n"
 	if guest_var_boolean($gho,"enable_nestedhvm");
@@ -283,7 +278,7 @@ if ($stage<2) {
     guest_destroy($gho);
 }
 
-guest_editconfig_midinstall($gho,$emptyiso);
+guest_editconfig_midinstall($gho);
 guest_create($gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);
ts-redhat-install +1 -6
index 64012db..0de5cd4 100755
@@ -106,8 +106,6 @@ ENDKEYS
 END
 }
 
-our $emptyiso= "/root/$flight.$job.$gn-empty.iso";
-
 sub prep () {
     target_install_packages_norec($ho, qw(lvm2 rsync genisoimage));
 
@@ -118,9 +116,6 @@ sub prep () {
                        100);
 
     my $newiso= "/root/$flight.$job.$gn-newiso";
-    my $emptydir= "/root/$flight.$job.$gn-empty-dir";
-
-    iso_create_empty($ho, $emptyiso, $emptydir);
 
     my @isogen= iso_gen_flags_basic();
 
@@ -158,7 +153,7 @@ if ($stage<2) {
     guest_destroy($gho);
 }
 
-guest_editconfig_midinstall($gho,$emptyiso);
+guest_editconfig_midinstall($gho);
 guest_create($gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#3 lore raw
In reply to Wei Liu

Wei Liu writes ("[PATCH OSSTEST v2 0/2] Test booting hvm guest with empty cdrom drive"):

Quoted 2 lines

This can only go in after the bug is fixed and possibly backported to all the trees we care about. It won't pass osstest self pushgate otherwise.

I pushed these but they broke, but only with XSM. See, for example:

From: osstest service owner <[email protected]>
To: <[email protected]>
Subject: [osstest test] 95322: regressions - FAIL
Date: Mon, 6 Jun 2016 19:29:51 +0000

flight 95322 osstest real [real]
http://logs.test-lab.xenproject.org/osstest/logs/95322/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 93413 test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 93413

I haven't had a chance to look at why, yet. For now, I have dropped these patches from the osstest push gate.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#4 lore raw
Quoted 16 lines · Ian Jackson

Wei Liu writes ("[PATCH OSSTEST v2 0/2] Test booting hvm guest with empty cdrom drive"):

Quoted 2 lines

This can only go in after the bug is fixed and possibly backported to all the trees we care about. It won't pass osstest self pushgate otherwise.

I pushed these but they broke, but only with XSM. See, for example:

From: osstest service owner <[email protected]>
To: <[email protected]>
Subject: [osstest test] 95322: regressions - FAIL
Date: Mon, 6 Jun 2016 19:29:51 +0000

flight 95322 osstest real [real]
http://logs.test-lab.xenproject.org/osstest/logs/95322/

Regressions :-(

Quoted 8 lines

Tests which did not succeed and are blocking,
including tests which could not be run:

   test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 93413
   test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 93413

I haven't had a chance to look at why, yet. For now, I have dropped these patches from the osstest push gate.

I would say it is more related to stubdom.

libxl: error: libxl_dm.c:1967:stubdom_xswait_cb: Stubdom 4 for 3 startup: startup timed out
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0x219b2d8: deregister unregistered
libxl: error: libxl_create.c:1422:domcreate_devmodel_started: device model did not start: -9

I've put this on my list and will investigate further.

Wei.

Quoted 2 lines

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#5 lore raw
Quoted 26 lines · Wei Liu
Quoted 16 lines · Ian Jackson

Wei Liu writes ("[PATCH OSSTEST v2 0/2] Test booting hvm guest with empty cdrom drive"):

Quoted 2 lines

This can only go in after the bug is fixed and possibly backported to all the trees we care about. It won't pass osstest self pushgate otherwise.

I pushed these but they broke, but only with XSM. See, for example:

From: osstest service owner <[email protected]>
To: <[email protected]>
Subject: [osstest test] 95322: regressions - FAIL
Date: Mon, 6 Jun 2016 19:29:51 +0000

flight 95322 osstest real [real]
http://logs.test-lab.xenproject.org/osstest/logs/95322/

Regressions :-(

Quoted 8 lines

Tests which did not succeed and are blocking,
including tests which could not be run:

   test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 93413
   test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 93413

I haven't had a chance to look at why, yet. For now, I have dropped these patches from the osstest push gate.

Quoted 7 lines

I would say it is more related to stubdom.

libxl: error: libxl_dm.c:1967:stubdom_xswait_cb: Stubdom 4 for 3 startup: startup timed out
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0x219b2d8: deregister unregistered
libxl: error: libxl_create.c:1422:domcreate_devmodel_started: device model did not start: -9

I've put this on my list and will investigate further.

I know why.

The backend for empty CDROM is always in state 1. Mini-OS blkfront refuses to move forward unless the backend status turns 4. See mini-os.git blkfront.c:init_blkfront.

I'm not entirely sure how to fix it though.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel