Red Hat Bugzilla – Bug 317721
mount/umount need improvement
Last modified: 2013-01-09 23:26:34 EST
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.
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
The hosts /dev, /dev/pts, /proc are effected by 'clean' (rm -rf /path/to/chroot).
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
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).
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...