From nobody Wed May 8 10:45:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=eu.citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1571665606; cv=none; d=zoho.com; s=zohoarc; b=Gt4Jlg9Pu45mwckZpKgtK0bPRb2fL/k1K/7JgTR3mXbXOTWAzkU8FMk89xzCnt6/TkQHGTra/+OL6TmB5BNZn04CKhxPTWFYjzjBXRzfN2SohPUaj4o5hMy9P1MHjnUbVpv1fmcVAj9zV/Z4NCOX5hyScAvYB0/kCWnlHr0hSaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571665606; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=TjyEW5P16omcALNjZzDdItRE2pMOyKYmzFAt7S+l+VM=; b=BLtCd1t/7/RqT3riECI+XbD3NAj/rCSThJGei+vyqtgCyuseXfRp2ABDpOZuaQpsano+GDe1XPK3kbQ8k7Dm3H3IAAb0TpswZTL7mqiElIAdWhqFeC6SfSyHboVwANxlkaG6MIiRCG3lI0R8c+6n3asxtC5S925tYg7iNBPEyIQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15716656064831010.6456015801361; Mon, 21 Oct 2019 06:46:46 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iMXnP-0003cA-5P; Mon, 21 Oct 2019 13:32:27 +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 1iMXnO-0003c5-Ni for xen-devel@lists.xenproject.org; Mon, 21 Oct 2019 13:32:26 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 358f54e6-f407-11e9-9452-12813bfff9fa; Mon, 21 Oct 2019 13:32:21 +0000 (UTC) X-Inumbo-ID: 358f54e6-f407-11e9-9452-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1571664741; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vvz+gMyWe9EIqHjEnqLGp304xsjSkwAR2HZxiTAJeXc=; b=EntdHUGvf4SSWlYzBERUa6zEoTw4U787SpBt0PeS1H6SooARo367S2oj P2NhXfxZ9gDx0ixgPQFTognSdeYdNjySik5rnTsYrm9tZRKFOx72DAG9a 8AWQoKkOz1vUGlgwqKmH1J550ZO/6wlpj/NfdExsQYxE+6eJOLnjRzbxF A=; Authentication-Results: esa5.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 (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.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=esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: Wj1j5+BIJVxqEkw3aWvN0zm5sTcZ1STcCMemoS5GxHGJk07C4jW+/SF2mrunMXsEZOmIps6C7R CQHr483hfxpvm4HI7PEBIN9mWbFxnpvDJ0SOsixojLv4VUyudAt5XrT73Y2ap2S73mMIfPy5tO UBrIS6RcTseYdYz3Fg/UbskSUz7FN2VW/0q+y8twrlE6YFPYf97PP6iy7G/fv/GwdqUrFwIgke 4HUIKTnHN2XVXPeTU7SpGfYUGOrclflncpurgpbspygHs2EyFQXY+hus6wgOMP4nQ/ggOAgHqd dHU= X-SBRS: 2.7 X-MesageID: 7496062 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.67,323,1566878400"; d="scan'208";a="7496062" From: Ian Jackson To: Date: Mon, 21 Oct 2019 14:32:15 +0100 Message-ID: <20191021133215.26518-1-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH] guest_prepare_disk: Only do the umount if we set an env var 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?q?J=C3=BCrgen=20Gro=C3=9F?= , Ian Jackson , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This call to guest_umount_lv is here for the benefit of ad-hoc reruns of (eg) ts-guest-start tidy up any ad-hoc messing about (eg from earlier runs of ts-debian-fixup or something). It is not needed in production runs. Serendipitously, this osstest code discovered a bug in the Linux blkback: when tearing down, it sets the backend state to 6 before it has closed the underlying block devices. This ultimately means that after "xl destroy" or "xl shutdown -w" there is a period when the guest's open handle onto its storage is still open. This is wrong. This detection depends on us winning a tricky race. So it shows up in osstest as a very low probability heisenbug. The bug is currently in all versions of Linux and causing a bit of a nuisance. It would be best to add a proper check for this bug. However, this is quite fiddly: really, it ought to be done as close to the xl command completion as possible, in the same ssh invocation. That would involve a fair bit of plumbing and ad-hocery. I don't think that would be proportionate for such a low-impact bug. So instead in this patch I just disable this cleanup code in the troublesome case, unless it is explicitly requested by the user setting OSSTEST_GUEST_DISK_MOUNT_CLEANUP to a trueish value. (This would be reasonably convenient for the ad-hoc testing that this call serves.) Thanks to Roger for diagnosing the Linux kernel bug. CC: Roger Pau Monne CC: J=C3=BCrgen Gro=C3=9F Signed-off-by: Ian Jackson Reviewed-by: Roger Pau Monn=C3=A9 --- Osstest/TestSupport.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 78f47480..6b0ee7a2 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1938,7 +1938,8 @@ sub guest_create_paused ($) { sub guest_prepare_disk ($) { my ($gho) =3D @_; =20 - guest_umount_lv($gho->{Host}, $gho); + guest_umount_lv($gho->{Host}, $gho) + if $ENV{'OSSTEST_GUEST_DISK_MOUNT_CLEANUP'}; =20 return if ($gho->{Diskfmt} // 'none') eq "none"; =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel