From patchwork Mon Nov 11 11:58:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11236849 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 441FE14E5 for ; Mon, 11 Nov 2019 12:00:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E22E21872 for ; Mon, 11 Nov 2019 12:00:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="ScY8c8Oi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E22E21872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eu.citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iU8LH-00055G-VY; Mon, 11 Nov 2019 11:58:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iU8LG-000557-Iz for xen-devel@lists.xenproject.org; Mon, 11 Nov 2019 11:58:46 +0000 X-Inumbo-ID: 9cc656fe-047a-11ea-a20c-12813bfff9fa Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 9cc656fe-047a-11ea-a20c-12813bfff9fa; Mon, 11 Nov 2019 11:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1573473526; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8yJ/+bHpmKCVr5QObajcP+FJP2gwQ6IRUZ+vk13rTzg=; b=ScY8c8OiA8PY/+PT47/56qPF1vaTZbGFluIHQgytJEuCNVMiYZBx5ekw F4dyq667PJv9P5rmHBsK8LM0PBeLc8YBtUOHnPBIlrLShjxEO3Szv+TAa BMacNaEalJHTVN2ZwMtVb9jZlol+QccVoo0OFDKVnwDTyzlvH4fwe5kCU w=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=Pass smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: +R0fsxYr/y1ozi0b83Mox8MD0HBCL3E22pT2F63OpWiDsNe//DCIZeBEF0UrowhlQJnn8ZvyY3 1ihT7L2Uo5lPrD7M/P1bjKbHzIHqoID4qaPu5bbZ38duz2tszyE18WMIc3waJjQy/B3QGspl0H +0DDuuFI2Lhhit1vrey9+oXMZvO0+NVwNsf88i/iLWrCQ2rn1UX5VUIr3YO4NFRM/S8Ow4ilZ0 vwFRbI51gxjY3sTeincS+iG4Qiy6rHL7UcneaOXKaTL+CIdGeNRwYBvbxI3l3udS6V5CGmi6SO E0o= X-SBRS: 2.7 X-MesageID: 8244999 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.68,292,1569297600"; d="scan'208";a="8244999" From: Ian Jackson To: Date: Mon, 11 Nov 2019 11:58:34 +0000 Message-ID: <20191111115835.31285-1-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 1/2] all guest creation: Pause 10s to work around libxl/blkback races X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= , Anthony PERARD , Ian Jackson , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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ß CC: Wei Liu CC: Anthony PERARD Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 2 ++ Osstest/Toolstack/libvirt.pm | 1 - Osstest/Toolstack/xl.pm | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 9c99ee17..f2baa7c2 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -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'}; diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index 23c76cc0..e817f5b4 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -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); diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index 517b0f4d..85972753 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -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); }