OSError: [Errno 16] Device or resource busy: 'home'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
click (Ubuntu) |
New
|
Critical
|
Unassigned |
Bug Description
On a fresh Xenial install, with encrypted home (ecryptfs) creation of click chroots always fails:
$ sudo click chroot -aamd64 -fubuntu-sdk-15.10 create
[...]
E: 10mount: umount: /var/lib/
E: 10mount: (In some cases useful info about processes that
E: 10mount: use the device is found by lsof(8) or fuser(1).)
E: click-ubuntu-
Command returned 1: schroot -u root -c source:
umount: /var/lib/
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
umount: /var/lib/
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
umount: /var/lib/
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
Traceback (most recent call last):
File "/usr/bin/click", line 110, in <module>
sys.
File "/usr/bin/click", line 106, in main
return mod.run(args)
File "/usr/lib/
return args.func(parser, args)
File "/usr/lib/
return chroot.
File "/usr/lib/
self.destroy()
File "/usr/lib/
shutil.
File "/usr/lib/
_rmtree_
File "/usr/lib/
onerror(
File "/usr/lib/
os.rmdir(name, dir_fd=topfd)
OSError: [Errno 16] Device or resource busy: 'home'
This leaves me in an inconsistent state where a subsequent exists will claim the chroot doesn't exist, but both create and destroy fail:
$ sudo click chroot -aamd64 -fubuntu-sdk-15.10 create
FileExistsError: [Errno 17] File exists: '/var/lib/
$ sudo click chroot -aamd64 -fubuntu-sdk-15.04 destroy
umount: /var/lib/
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
umount: /var/lib/
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
umount: /var/lib/
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
Traceback (most recent call last):
File "/usr/bin/click", line 110, in <module>
sys.
File "/usr/bin/click", line 106, in main
return mod.run(args)
File "/usr/lib/
return args.func(parser, args)
File "/usr/lib/
return chroot.destroy()
File "/usr/lib/
shutil.
File "/usr/lib/
_rmtree_
File "/usr/lib/
onerror(
File "/usr/lib/
os.rmdir(name, dir_fd=topfd)
OSError: [Errno 16] Device or resource busy: 'home'
It's not the same as bug 1427264 and the work-around doesn't affect it.
description: | updated |
Work-around:
In the file /usr/lib/ python3/ dist-packages/ click/chroot. py
Change the last line of the maint() method to always return 0:
def maint(self, *args):
...
return 0 # ret
With this in place you'll see the errors but can successfully use click chroots.