Bug 741722 - better chroot support
better chroot support
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lorax (Show other bugs)
16
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Martin Gracik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-27 14:24 EDT by Daniel Mach
Modified: 2013-07-04 08:59 EDT (History)
3 users (show)

See Also:
Fixed In Version: lorax-16.4.6-1.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-13 00:33:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Mach 2011-09-27 14:24:18 EDT
I ran lorax (as part of pungi) in mock chroot.

It failed with:
Traceback (most recent call last):
  File "/usr/bin/pungi", line 222, in <module>
    main()
  File "/usr/bin/pungi", line 124, in main
    mypungi.doBuildinstall()
  File "/usr/lib/python2.7/site-packages/pypungi/__init__.py", line 845, in doBuildinstall
    workdir=workdir, outputdir=outputdir)
  File "/usr/lib/python2.7/site-packages/pylorax/__init__.py", line 438, in run
    self.installtree.yum.remove(package, pattern_list)
  File "/usr/lib/python2.7/site-packages/pylorax/yumhelper.py", line 120, in remove
    shutil.rmtree(fname)
  File "/usr/lib64/python2.7/shutil.py", line 244, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib64/python2.7/shutil.py", line 253, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib64/python2.7/shutil.py", line 251, in rmtree
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: '.../work/x86_64/yumroot//var/lib/yum/history'

This is probably due to using a NFS storage.


Lorax also needs /proc mounted (since /etc/mtab is a symlink to /proc/mounts).

Touching /proc/mounts is not enough, because /proc is also needed when creating images (efiboot, I think):
/proc/devices: fopen failed: No such file or directory
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Command failed
unable to create efidisk image

if /proc is not mounted, it ends with various crashes and lorax should check whether /proc is mounted as soon as possible.



Proposed fixes:
1)
 $ vim /usr/lib/python2.7/site-packages/pylorax/yumhelper.py +120
 add: ignore_errors=True to rmtree()
 (that's what mgracik proposed, seems to be working)

2) check if /proc is mounted when starting lorax
Comment 1 Fedora Update System 2011-10-03 10:03:42 EDT
lorax-16.4.5-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/lorax-16.4.5-1.fc16
Comment 2 Fedora Update System 2011-10-03 13:44:20 EDT
Package lorax-16.4.5-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lorax-16.4.5-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/lorax-16.4.5-1.fc16
then log in and leave karma (feedback).
Comment 3 Fedora Update System 2011-10-11 13:54:10 EDT
lorax-16.4.6-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/lorax-16.4.6-1.fc16
Comment 4 Fedora Update System 2011-10-13 00:33:00 EDT
lorax-16.4.6-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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