Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 317721 - mount/umount need improvement
mount/umount need improvement
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Clark Williams
Depends On:
  Show dependency treegraph
Reported: 2007-10-03 22:35 EDT by BJ Dierkes
Modified: 2013-01-09 23:26 EST (History)
2 users (show)

See Also:
Fixed In Version: 0.9.7-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-07 16:32:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description BJ Dierkes 2007-10-03 22:35:12 EDT
In response to:

Bugzilla Bug 236428: RFE: Please bind mount host /dev to chroot/dev

Description of problem:

Often times mock exits without properly umounting one or all of /dev, /devpts,
and /proc (which are bind mounted from the host).  Once mock re-issues a 'clean'
for that same chroot it completely kills the host systems /dev, /devpts, and /proc.

Version-Release number of selected component (if applicable):

0.7.6, presumably since 0.7.1 when bind mounting was introduced.

How reproducible:

Steps to Reproduce:
1. Initiate a rebuild
2. Exit dirty (say... CTRL-C)

... do so until you have the host bind mounts lingering around.

3. Re-initiate the same build (i.e. use the same chroot

Actual results:

The hosts /dev, /dev/pts, /proc are effected by 'clean' (rm -rf /path/to/chroot).

Expected results:

The 'clean' method should properly *ensure* that the mount points are indeed
unmounted.  If it can't guarantee that, then it shouldn't proceed with cleaning
the chroot.

Additional info:
Comment 1 BJ Dierkes 2007-10-04 15:05:46 EDT
Related: https://bugzilla.redhat.com/show_bug.cgi?id=250985
Comment 2 BJ Dierkes 2007-10-04 16:40:25 EDT
Patch submitted in BZ 250985 to properly umount '/dev'.  The issue as described
above is not entirely accurate, as the issue does not necessarily stem from Mock
not handling a TERM signal.  

The overall issue is if clean() is called on a chroot that still has bind mounts
from the host (for this bug).
Comment 3 Clark Williams 2008-03-07 16:32:30 EST
This was one of the major topics addressed in the great rewrite that happened
around 0.8+., where a lot of effort went into ensuring that the bind mounts were
cleaned up on exit. 

Closing for now...

Note You need to log in before you can comment on or make changes to this bug.