[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH] guest_prepare_disk: Only do the umount if we set an env var


  • To: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 21 Oct 2019 16:33:32 +0200
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Jürgen Groß <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 21 Oct 2019 14:33:48 +0000
  • Ironport-sdr: W3k/u59MrgZaeDOQu97PaRLmoan/syieritFghn2jpSnsb7BcSc9k8Ed4JM9bjTPurUruqwylD 2OQpymr/TUSDzzNzRgo4bmYlXLD42FWOCTlFcGzOmO5CskA+Z4QooTPYqX76NgBMgdH86rUbR2 emYoMaHVRFIAEoRxJFTwjenuKHjqN/wV1MvaknHIfk/IsI340FKIa6SenolrkuI2gA/RQrqjuA qbRfjWdozPqgH+DbxN8fd/uT+yBfhL5W2bE4E+2NSggHjb1xhU96v0LSnvj+v5FrSID28aV+8v fz8=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 21, 2019 at 02:32:15PM +0100, Ian Jackson wrote:
> 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 <roger.pau@xxxxxxxxxx>
> CC: Jürgen Groß <jgross@xxxxxxxx>
> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Thanks:

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.