@@ -1938,6 +1938,8 @@ sub guest_create_paused ($) {
sub guest_prepare_disk ($) {
my ($gho) = @_;
+ sleep(10);
+
guest_umount_lv($gho->{Host}, $gho)
if $ENV{'OSSTEST_GUEST_DISK_MOUNT_CLEANUP'};
@@ -55,7 +55,6 @@ 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);
@@ -43,7 +43,6 @@ 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);
}
In 1d3a97b06d2c xl guest creation: Pause 10s to work around libxl/blkback races we added a 10s delay to work around a race bug in Linux blkback. This was intended to be used in combination with ea6626f7edd9 guest_prepare_disk: Only do the umount if we set an env var after which it is only xl which is vulnerable to this race. But that commit was wrong, so we must revert it. After we do that the sleep in the xl driver will come too late. So, move the 10s sleep from the osstest xl and libvirt drivers to the general guest preparation step, right next to where the affected lv in use check is. This is still a bodge, unfortunately. CC: Jürgen Groß <jgross@suse.com> CC: Wei Liu <wl@xen.org> CC: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- Osstest/TestSupport.pm | 2 ++ Osstest/Toolstack/libvirt.pm | 1 - Osstest/Toolstack/xl.pm | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)