[Piuparts-devel] Bug#649327: piuparts: chroot removal fails due to /proc/sys/fs/binfmt_misc being mounted

Andreas Beckmann debian at abeckmann.de
Sat Nov 19 23:41:19 UTC 2011


Package: piuparts
Version: 0.41
Severity: normal

Hi,

the http://piuparts.debian.org/sid/pre_installation_script_error.html
report is full of false positives, e.g.
http://piuparts.debian.org/sid/fail/codeblocks-common_10.05-2.log

0m16.9s DEBUG: Starting command: ['chroot', '/org/piuparts.debian.org/tmp/tmpkXL29W', 'umount', '/proc']
0m16.9s DUMP: 
  chroot: failed to run command `umount': No such file or directory
0m16.9s DEBUG: Command failed (status=127), but ignoring error: ['chroot', '/org/piuparts.debian.org/tmp/tmpkXL29W', 'umount', '/proc']
Traceback (most recent call last):
  File "/org/piuparts.debian.org/sbin/piuparts", line 2333, in <module>
    main()
<snip>
  File "/org/piuparts.debian.org/sbin/piuparts", line 631, in remove
    shutil.rmtree(self.name)
  File "/usr/lib/python2.6/shutil.py", line 212, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.6/shutil.py", line 212, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.6/shutil.py", line 217, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.6/shutil.py", line 215, in rmtree
    os.remove(fullname)
OSError: [Errno 1] Operation not permitted: '/org/piuparts.debian.org/tmp/tmpkXL29W/proc/asound/pcm'

There are two things to be fixed here:

* consider python errors, tracebacks, ... from piuparts in the
  home/piupartsm/bin/detect_piuparts_issues as transient errors and
  retry regularily

  git://github.com/anbe42/piatti.git feature/detect-piuparts-issues

* fix the unmounting part, I'd suggest to parse the hosts /proc/mounts
  and unmount everything thats mounted inside the chroot, I have a patch
  but that only works for the most basic chroot setup - not sure how to
  integrate this with lvm snapshots, selinux and class VirtServ(Chroot).

  git://github.com/anbe42/piuparts.git preview/umount-more-carefully

Andreas





More information about the Piuparts-devel mailing list