Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
os.rename throws exception when renaming directories on lower overlayfs layers #25409
Comments
GordonTheTurtle
added
the
version/1.12
label
Aug 4, 2016
rovner
referenced this issue
Aug 4, 2016
Open
EXDIR when renaming non-empty directories on lower AUFS layers #19512
thaJeztah
added
the
area/storage/overlay
label
Aug 4, 2016
|
Could this be a related to docker#12327 (which should be fixed in kernel 4.5)? |
|
This is running 4.4.7 though... On 4 Aug 2016 4:55 p.m., "Sebastiaan van Stijn" notifications@github.com
|
rovner
commented
Aug 5, 2016
|
Same error on kernel 4.6
|
|
ping @dmcgowan ptal |
xrow
commented
Aug 9, 2016
|
Hi, this is a quite dangerous and serve bug. It seems that we have a similar issue with a PHP application.
We will try provide a reproduceable case on centos 7. |
dennisxrow
commented
Aug 9, 2016
|
I prepared a testcase:
System specs:
It works on Centos 7 wit Kernel 4.7, however with a weird sideeffect:
ls -lisa shows ?????? for /imAlreadyHereBeforeYouStartTheContainer.txt after renaming it to /foo.txt @thaJeztah pointed out it should be fixed in Kernel 4.5, wich does not seems to be the case. System 2 (Kernel 4.7 running with XFS ) specs:
|
koct9i
commented
Aug 9, 2016
•
That's how overlayfs works. Rename and link doesn't work across layers. You must copy all files and remove source. Maybe shutil.move could do that
AFAIR XFS dooesn't support d_type in readdir by default. Probably our instance was created without required features. In newer kernels overlayfs complains about that in dmesg. |
dmcgowan
added
the
area/kernel
label
Aug 9, 2016
dennisxrow
commented
Aug 10, 2016
|
@koct9i Everything works fine with Kernel 4.7 and ext4. |
|
ping @AkihiroSuda you may be interested in this as well (for your overview) ^^ |
|
https://github.com/torvalds/linux/blob/v4.8-rc2/fs/overlayfs/copy_up.c#L318-L322
I think returning EXDEV is reasonable, and don't expect the upstream kernel to fix the issue. I'll open a PR to add a note about the issue into the documentation edit: opened docker#25705 |
|
just for information, linking some real-world issues to here (Note that AUFS has this kind of issue as well) NPM: npm/npm#9863 |
added a commit
to AkihiroSuda/docker
that referenced
this issue
Aug 15, 2016
added a commit
to AkihiroSuda/docker
that referenced
this issue
Aug 15, 2016
AkihiroSuda
referenced this issue
Aug 15, 2016
Merged
Add a note about the open(2) and rename(2) on AUFS and OverlayFS #25705
added a commit
to AkihiroSuda/issues-docker
that referenced
this issue
Aug 15, 2016
added a commit
to AkihiroSuda/docker
that referenced
this issue
Aug 16, 2016
added a commit
to AkihiroSuda/docker
that referenced
this issue
Aug 16, 2016
vdemeester
closed this
in
#25705
Aug 16, 2016
added a commit
to thaJeztah/docker
that referenced
this issue
Aug 16, 2016
added a commit
to thaJeztah/docker
that referenced
this issue
Aug 17, 2016
|
I am going to keep this issue open since it is unique to overlay. Only overlay does not allow any renaming of directories on lower layers even if they are on the same device. This test fails in |
dmcgowan
reopened this
Aug 18, 2016
xrow
commented
Aug 18, 2016
|
If you see in our test case, the issue is not limited to directories. It affects files as well. |
added a commit
to dekkagaijin/docker
that referenced
this issue
Aug 18, 2016
FelikZ
referenced this issue
Sep 5, 2016
Closed
Same image & container has different behavior on different hosts #26317
|
Yes I think |
This was referenced Nov 2, 2016
added a commit
to AppGyver/depot_tools
that referenced
this issue
Mar 9, 2017
This was referenced Mar 28, 2017
borntorock
commented
Apr 4, 2017
•
|
Hey, Did we get the solution from the upstream AUFS community on this Invalid cross-device link error. I'm facing this issue while simply executing |
SolomonShorser-OICR
commented
Apr 10, 2017
|
I'm also getting |
This was referenced Apr 14, 2017
added a commit
to linkerd/rustup-nightly-docker
that referenced
this issue
May 3, 2017
olix0r
referenced this issue
in linkerd/rustup-nightly-docker
May 3, 2017
Merged
Provide an install-rust.sh script #3
added a commit
to linkerd/rustup-nightly-docker
that referenced
this issue
May 3, 2017
antoinetran
commented
Aug 30, 2017
•
|
I have the same issue with latest docker-17.06.1-ce, and CentOS Linux release 7.2.1511 (Core) , and latest kernel-3.10.0-514.26.2.el7 |
antoinetran
commented
Aug 30, 2017
|
antoinetran
commented
Aug 30, 2017
|
Ok, moving back to devicemapper following https://docs.docker.com/engine/userguide/storagedriver/selectadriver/#check-and-set-your-current-storage-driver is a working workaround. |
rovner commentedAug 4, 2016
Output of
docker version:Output of
docker info:Additional environment details (AWS, VirtualBox, physical, etc.):
Steps to reproduce the issue:
os.renameDescribe the results you received:
Rename failed with error
OSError: [Errno 18] Invalid cross-device link: '/foo' -> '/foo2'Describe the results you expected:
Rename finished successfully