Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: EXDEV: cross-device link not permitted, rename #852

Closed
0o-de-lally opened this issue Oct 27, 2016 · 12 comments
Closed

Error: EXDEV: cross-device link not permitted, rename #852

0o-de-lally opened this issue Oct 27, 2016 · 12 comments
Labels

Comments

@0o-de-lally
Copy link

I'm getting this error in docker cloud, but not in quay.io . Quay builds perfectly. I don't know what a cross-device link is, in docker context.

The full error is:
Error: EXDEV: cross-device link not permitted, rename '/opt/meteor/dist/bundle' -> '/opt/meteor/dist/bundle-garbage-14tplr2'

@0o-de-lally
Copy link
Author

@pkennedyr @borjaburgos , any ideas why this may be? Seems to be intermittent.

@juicelink
Copy link

juicelink commented Nov 7, 2016

I've systematicly the same error since october, 12, building a node api

EXDEV: cross-device link not permitted, rename '/tmp/src/node_modules/babel-runtime' -> '/tmp/src/node_modules/.babel-runtime.DELETE'

all the js versions of my packages are fixed.

before october, 12 I had no problem to build my image
I build my app on the official image.
Last success build on node 6.9.1
First failed build on v7.0.0
Today I've fixed the node version to 6.9.1 but builds continue to fail

@pchico83
Copy link

pchico83 commented Nov 7, 2016

@juicelink do you mean October 12?

@juicelink
Copy link

Yes, sorry. Edited

@pchico83
Copy link

pchico83 commented Nov 7, 2016

@juicelink can you provide the docker repo where this is happening? I have the feeling that this is a 1.12 regression, but we need to investigate further. Having a dockerfile that consistently incurs in this error will help to troubleshot and to find a fix.

@juicelink
Copy link

@pchico83 it's a private repo. I'll try to reproduce in a public one and come back to you

@pchico83
Copy link

pchico83 commented Nov 7, 2016

@juicelink if I have the docker repo where this is happening, I should be able to reproduce it.

@juicelink
Copy link

@pchico83 here's a repo with the issue: juicelink/test-cross-device-link

I've rewritten my Dockerfile to avoid the issue.
I ran 2 npm install , one first in prod (for the serverside) and one in development (for building sources) with copying the module of the first npm install to avoid to redownload them
The issue was triggered at the 2nd npm install

I run now just 1 npm install (dev env) to build from the sources then npm prune (prod env) to get only my production modules

@pchico83
Copy link

pchico83 commented Nov 9, 2016

@juicelink I am investigating it, but looks like an engine issue and probably the fix won't be available until docker 1.13 is released. Thanks for helping to troubleshot the issue.

@pchico83
Copy link

@juicelink looks like an issue with npm that they are fixing:
npm/npm#13901

@caervs
Copy link

caervs commented Dec 8, 2016

@juicelink there is also some good information at npm/npm#9863

The tl;dr is npm combined with docker has problems when you try to move files in one layer to a path that exists in a previous layer (i.e. override one RUN command with another RUN command).

So a good tip is to try to do both installations in a single RUN command like

RUN npm i --production && cp -R . /tmp/src && ls /tmp/src && cd /tmp/src && npm i

I've tested with the example build you gave here and it worked.

@github-actions
Copy link

We are clearing up our old issues and your ticket has been open for one year with no activity. Remove stale label or comment or this will be closed in 15 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants