Bug 741722 - better chroot support
Summary: better chroot support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lorax
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Martin Gracik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-27 18:24 UTC by Daniel Mach
Modified: 2013-07-04 12:59 UTC (History)
3 users (show)

Fixed In Version: lorax-16.4.6-1.fc16
Clone Of:
Environment:
Last Closed: 2011-10-13 04:33:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Mach 2011-09-27 18:24:18 UTC
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 14:03:42 UTC
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 17:44:20 UTC
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 17:54:10 UTC
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 04:33:00 UTC
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.