Bug 838609
Summary: | guestmount + fusermount allows a race condition when unmounting and immediately using the disk image | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Richard W.M. Jones <rjones> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3 | CC: | dnaori, dyasny, leiwang, mbooth, moli, pbrady, qguan, rjones |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libguestfs-1.16.30-2.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 838592 | Environment: | |
Last Closed: | 2013-02-21 08:38:33 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 838592 | ||
Bug Blocks: | 835466 |
Description
Richard W.M. Jones
2012-07-09 15:17:54 UTC
the time might quite short, after fusermount return, and before guestmount finished cleanup, so not quite easy to reproduce, any suggestion for this, Rich? I think you just need to check that RHEL 6.4 guestmount has the --pid-file option. The race condition has *not* been fixed (and cannot be fixed). The fix is for callers -- OpenStack in this case -- to use the guestmount --pid-file option. $ guestmount --version guestmount 1.16.32rhel=6,release=3.el6 $ guestmount --pid-file guestmount: option '--pid-file' requires an argument Try `guestmount --help' for more information. .. and check that --pid-file actually writes a PID file! [root@station2 tmp]# guestmount --version guestmount 1.16.32rhel=6,release=3.el6 the solution is "Suggest adding 'guestmount --pid-file=...' option so that a PID file can be written, and then programs can wait for the PID to exit after the fusermount." [root@station2 tmp]# guestmount --pid-file pid -a RHEL-Server-5.9-32-pv.raw -i test [root@station2 tmp]# cat pid 6043 so other program could get the pid from file, and wait for the $pid process to exit, to avoid the race condition, Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0324.html |