Bug 317721 - mount/umount need improvement
Summary: mount/umount need improvement
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
(Show other bugs)
Version: unspecified
Hardware: All Linux
low
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-04 02:35 UTC by BJ Dierkes
Modified: 2013-01-10 04:26 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description BJ Dierkes 2007-10-04 02:35:12 UTC
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 19:05:46 UTC
Related: https://bugzilla.redhat.com/show_bug.cgi?id=250985

Comment 2 BJ Dierkes 2007-10-04 20:40:25 UTC
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 21:32:30 UTC
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.