Skip to contentSkip to conversation

xl guest creation: Pause 10s to work around libxl/blkback races

PATCH New Ian Jackson 1 participant 1 message Oct 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl guest creation: Pause 10s to work around libxl/blkback races

In ea6626f7edd9eb40a3510eaf6816a77cac4f63d0
guest_prepare_disk: Only do the umount if we set an env var
we removed (in the usual case) a check for the guest disk already being mounted in dom0 etc. This check is there for ad-hoc testing.

We removed it because it exposes what we think is an annoying race in blkback.

Unfortunately this change seems to have made guest-rapid-restart races worse rather than better. Steps test-* guest-start/debian.repeat seem to fail a lot more now.

We are in the throes of preparing the Xen 4.13 release. These guest restart races have existed for a long time.

Bodge this for now by adding a sleep :-/.

We do this in the xl toolstack, during domain creation. And also in the libvirt toolstack because that uses xl but doesn't inherit the sleep from the Osstest module.

CC Jürgen Groß <[email protected]>
CC Wei Liu <[email protected]>
CC Anthony PERARD <[email protected]>
---
 Osstest/Toolstack/libvirt.pm | 1 +
 Osstest/Toolstack/xl.pm      | 1 +
 2 files changed, 2 insertions(+)
Osstest/Toolstack/libvirt.pm +1 -0
index e817f5b4..23c76cc0 100644
@@ -55,6 +55,7 @@ sub create ($$) {
     my $lcfg = $cfg;
     $lcfg =~ s,/,-,g;
     $lcfg = hostnamepath($ho)."--$lcfg";
+    sleep(10);
     target_cmd_root($ho, "virsh domxml-from-native xen-xl $cfg > $cfg.xml", 30);
     target_getfile_root($ho,60,"$cfg.xml", "$stash/$lcfg");
     target_cmd_root($ho, "virsh create --file $cfg.xml", 100);
Osstest/Toolstack/xl.pm +1 -0
index 85972753..517b0f4d 100644
@@ -43,6 +43,7 @@ sub destroy ($$) {
 sub _create ($$$) {
     my ($self,$gho,$options) = @_;
     my $cfg = $gho->{CfgPath};
+    sleep(10);
     target_cmd_root($self->{Host},
 		    $self->{_VerboseCommand}." create $options $cfg", 100);
 }
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel