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
Docker build that fails with overlay storage backend only? #12327
Comments
Can you try with either the master build or the latest 1.6 RC? |
Tested, exact same problem I'm afraid. docker version:
|
Yup, I can confirm in master. |
@LK4D4 what kernel version are you running and underlying filesystem (ext4?)? |
@vbatts yes, ext4 (kernel was 3.18 - tried with 3.19 too) |
@vbatts mine is 4.0 with ext4 |
Not sure if this is related with the overlay driver. Installing pip with the get-pip.py script, which installs the latest version, works fine on overlay. docker info
fail
success
|
that would be nice to confirm. From my investigation, it seemed pretty murky in the failed example, that it made one of the egg info as a unix socket and failed to remove it from /tmp. Seemed like a bad file check somewhere, but I didn't feel like that was happening in the kernel... |
correct. Overlayfs and unix sockets do not play nice together yet. But why On Wed, Apr 29, 2015 at 1:24 PM, Alexander Morozov <notifications@github.com
|
Suffering from this exactly as above with Ubuntu 14.04 with 3.19.0-25-generic and Docker 1.7.1 |
I have this too with Ubuntu 15.04 with 3.19.0-28-generic, Docker 1.8.2 configured with
I have a second machine on which I configured the same OS (it's a VM - I just copied it) with Docker using
|
Same problem here with
|
@vbatts @rochacon @lvangool I can confirm that patch-series from https://lkml.org/lkml/2015/10/9/620 fixes both issues. |
Overlay storage driver used by Deis has a bug and you cannot replace the debian installed six==1.8.0 with a newer version. This breaks `git push` to Deis to build the image with the builder. Make the requirements use six==1.8.0 as a workaround.
Hi @LK4D4 when will the patch being merged, I've updated my kernel to 4.4.0, and the problem still there.
|
I have a similar issue, copied (and closed) from #19262: The following Dockerfile fails to build on Overlay, but works on AUFS. I replicated this on two machines, docker-machine built and one running ubuntu trusty with linux kernel 4.2. FROM python:3.4
RUN pip install flake8==2.5.1
RUN pip install flake8==2.5.0 Note it also fails with FROM python:3.4
RUN pip install flake8==2.5.1 && pip install flake8==2.5.0 Note: I know installing flake8 then installing a lesser version isn't great, but that doesn't change the fact that this is a bug. The problem is only exhibited on overlay, and not any other storage driver I've tried. Build output on overlay:
docker info:
docker version:
created via:
This also fails on another VM:
No interesting dmesg or docker.log output was found. |
For those who don't know, until this gets merged, you can bypass this problem by running the pip upgrade command together with apt-get install to avoid file system layering. Something like this:
|
I think this may be related to https://bugzilla.kernel.org/show_bug.cgi?id=109611. |
Also fix the pip install with a workaround for moby/moby#12327. Thanks @jgmize!
Not sure whether this is related to moby/moby#19647..
I had the same issue, my workaround was to simply install my own custom python packages in a virtualenvironment. That way pip never needed to attempt to uninstall any dist packages and the problem was worked around. Here's my recipe for anyone interested and using ubuntu:14.04 as a base. Before:
After:
As you can see the file is slightly messier, but the upside is that it works with my CI system now (codeship). |
Hi all, I've recently upgraded Linux kernel to 4.6.4 (back from 4.1) and the problem seems to be gone! Do you have the same observation? |
According to https://bugzilla.kernel.org/show_bug.cgi?id=109611, this is fixed in kernel 4.5 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=45d11738969633ec07ca35d75d486bf2d8918df6 ping @LK4D4 can you verify if that's what solves this issue? |
Seems to be fixed in 4.4.21 too. (4.4 stable series has had a lot of the overlay fixes backported recently). |
This problem doesn't seem to be specific to python / pip. Running overlay fs on ext4, kernel 4.4 (info below) a simple root@host:~# uname -a
Linux host 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@host:~# docker info
Containers: 25
Running: 5
Paused: 0
Stopped: 20
Images: 28
Server Version: 1.12.1
Storage Driver: overlay
Backing Filesystem: extfs
Logging Driver: journald
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-38-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.795 GiB
Name: host
ID: SMFL:O7UP:7O4O:RVSD:QIQ2:FMX5:EVF5:UY74:336S:3QWI:DSEU:2HME
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
root@host:~# ls
Dockerfile foo
root@host:~# cat Dockerfile
FROM alpine
COPY foo /foo
root@host:~# docker build .
Sending build context to Docker daemon 21.5 kB
Step 1 : FROM alpine
---> ee4603260daa
Step 2 : COPY foo /foo
stat /var/lib/docker/overlay/78c71862cccbd03b4a5be0f44e21753c7fee96ecc37f6e8048497d6f14141ee1/merged/foo: no such file or directory
root@host:~# Strangely enough, restarting docker engine "solved" the problem. |
This issue is resolved in recent kernelsThis issue is resolved in recent kernels; if possible, upgrade your kernel to a version that includes this fix, or contact your OS vendor to make sure they carry the fix that resolves this. For more information, read the comments above; #12327 (comment), and #12327 (comment). Note that this is not a bug in Docker, so please don't comment that you're still having this on docker version x.y.z. |
Addresses: Collecting pip Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB) Collecting wheel Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) Installing collected packages: pip, wheel Found existing installation: pip 1.5.6 Uninstalling pip-1.5.6: Exception: Traceback (most recent call last): File "/tmp/tmpqu31Wp/pip.zip/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/tmp/tmpqu31Wp/pip.zip/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_set.py", line 778, in install requirement.uninstall(auto_confirm=True) File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_install.py", line 754, in uninstall paths_to_remove.remove(auto_confirm) File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/tmp/tmpqu31Wp/pip.zip/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/usr/lib/python2.7/shutil.py", line 300, in move rmtree(src) File "/usr/lib/python2.7/shutil.py", line 247, in rmtree rmtree(fullname, ignore_errors, onerror) File "/usr/lib/python2.7/shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/usr/lib/python2.7/shutil.py", line 254, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/usr/lib/python2.7/dist-packages/pip/backwardcompat' when Docker is using the overlay fs backend. See: moby/moby#12327
Addresses: Collecting pip Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB) Collecting wheel Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) Installing collected packages: pip, wheel Found existing installation: pip 1.5.6 Uninstalling pip-1.5.6: Exception: Traceback (most recent call last): File "/tmp/tmpqu31Wp/pip.zip/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/tmp/tmpqu31Wp/pip.zip/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_set.py", line 778, in install requirement.uninstall(auto_confirm=True) File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_install.py", line 754, in uninstall paths_to_remove.remove(auto_confirm) File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/tmp/tmpqu31Wp/pip.zip/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/usr/lib/python2.7/shutil.py", line 300, in move rmtree(src) File "/usr/lib/python2.7/shutil.py", line 247, in rmtree rmtree(fullname, ignore_errors, onerror) File "/usr/lib/python2.7/shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/usr/lib/python2.7/shutil.py", line 254, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/usr/lib/python2.7/dist-packages/pip/backwardcompat' when Docker is using the overlay fs backend. See: moby/moby#12327
Addresses: Collecting pip Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB) Collecting wheel Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) Installing collected packages: pip, wheel Found existing installation: pip 1.5.6 Uninstalling pip-1.5.6: Exception: Traceback (most recent call last): File "/tmp/tmpqu31Wp/pip.zip/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/tmp/tmpqu31Wp/pip.zip/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_set.py", line 778, in install requirement.uninstall(auto_confirm=True) File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_install.py", line 754, in uninstall paths_to_remove.remove(auto_confirm) File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/tmp/tmpqu31Wp/pip.zip/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/usr/lib/python2.7/shutil.py", line 300, in move rmtree(src) File "/usr/lib/python2.7/shutil.py", line 247, in rmtree rmtree(fullname, ignore_errors, onerror) File "/usr/lib/python2.7/shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/usr/lib/python2.7/shutil.py", line 254, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/usr/lib/python2.7/dist-packages/pip/backwardcompat' when Docker is using the overlay fs backend. See: moby/moby#12327
See, moby/moby#12327 Travis error during selenium installation (only in the Python 3.6 test): https://travis-ci.org/webfp/tor-browser-selenium/jobs/310530961#L561
This Dockerfile doesn't seem to build with the overlay storage backend:
It ends up spitting out the below errors:
The same Dockerfile works with both AUFS and DeviceMapper storage backends (have not tried with BTRFS).
docker version:
docker info:
uname -a:
Any suggestions or additional info I can provide?
The text was updated successfully, but these errors were encountered: