overlay: mkdir fails if directory exists in lowerdir in a user namespace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
Seth Forshee | ||
Wily |
Fix Released
|
High
|
Seth Forshee | ||
Xenial |
Fix Released
|
High
|
Seth Forshee | ||
linux-lts-wily (Ubuntu) |
Confirmed
|
High
|
Unassigned | ||
Wily |
Confirmed
|
High
|
Unassigned | ||
Xenial |
Confirmed
|
High
|
Unassigned |
Bug Description
If a directory exists in the lowerdir but not in the mounted
overlay, then mkdir of the directory in the target dir results
in a mysterious -EPERM. I've seen this both in wily kernel
(4.2.0-22-generic #27-Ubuntu) and in a hand-built xenial
master-next (with unrelated patches added).
=======
#!/bin/sh -ex
dir=`mktemp -d`
cleanup() {
umount -l $dir/t
rm -rf $dir
}
trap cleanup EXIT
echo "dir is $dir"
mkdir -p $dir/l $dir/u $dir/w $dir/t
mkdir $dir/l/dev
mount -t overlay -o lowerdir=
stat $dir/t/dev
rmdir $dir/t/dev
mkdir $dir/t/dev
echo $?
echo "mkdir should have succeeded"
=======
The above will work on the host, but fail in a user namespace, i.e
in a regular lxd container.
summary: |
- overlay: mkdir fails if directory exists in lowerdir + overlay: mkdir fails if directory exists in lowerdir in a user namespace |
tags: |
added: kernel-da-key removed: kernel-key |
Changed in linux (Ubuntu Wily): | |
assignee: | nobody → Seth Forshee (sforshee) |
Changed in linux (Ubuntu Xenial): | |
assignee: | nobody → Seth Forshee (sforshee) |
Changed in linux-lts-wily (Ubuntu Wily): | |
importance: | Undecided → High |
Changed in linux-lts-wily (Ubuntu Xenial): | |
importance: | Undecided → High |
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1531747
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.