Repository navigation
Description
I started to use "overlay" driver today and seeing odd behaviors in my containers (CentOS 6).
yum install <pkg>in Dockerfile always fails, but running it again in the same container always succeeds.tail -f <file>doesn't show appended contents
For 1, this simple Dockerfile always fails at second yum install (for perl)
FROM centos:centos6
RUN yum install -y sudo
RUN yum install -y perl
with this error:
Step 2 : RUN yum install -y perl
---> Running in 21669e152088
...
Rpmdb checksum is invalid: dCDPT(pkg checksums): perl-version.x86_64 3:0.77-136.el6_6.1 - u
INFO[0018] The command [/bin/sh -c yum install -y perl] returned a non-zero code: 1
However, running the same command twice in the same container always succeeds.
FROM centos:centos6
RUN yum install -y sudo
RUN (yum install -y perl || yum install -y perl)
Step 2 : RUN (yum install -y perl || yum install -y perl)
---> Running in 5bf1177b4437
...
Rpmdb checksum is invalid: dCDPT(pkg checksums): perl-version.x86_64 3:0.77-136.el6_6.1 - u
Installing : 4:perl-5.10.1-136.el6_6.1.x86_64 6/6
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.vastspace.net
* extras: mirror.vastspace.net
* updates: mirror.vastspace.net
Package 4:perl-5.10.1-136.el6_6.1.x86_64 already installed and latest version
Nothing to do
---> 2671034175e9
Removing intermediate container 5bf1177b4437
Successfully built 2671034175e9
Even though I change perl to something else, I get the same behavior.
For 2, I noticed that doing tail -f <application.log> first shows last 10 lines of the log file, then it doesn't show any appended contents. If I press Ctrl+C and redo, it will show the most recent contents.
I have only tried the official centos:centos6 image so far, and the above behavior is 100% reproducible. I didn't try other images.
Docker Host:
CoreOS latest alpha with ext4 root file system and "overlay" driver. I'm running it on EC2, and recreated it once but the problem persists.
core@core-01 ~ $ cat /etc/os-release
NAME=CoreOS
ID=coreos
VERSION=561.0.0
VERSION_ID=561.0.0
BUILD_ID=
PRETTY_NAME="CoreOS 561.0.0"
ANSI_COLOR="1;32"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"
Docker Version and Info:
core@core-01 ~ $ docker --version
Docker version 1.4.1, build 5bc2ff8-dirty
core@core-01 ~ $ docker info
Containers: 1
Images: 4
Storage Driver: overlay
Execution Driver: native-0.2
Kernel Version: 3.18.2
Operating System: CoreOS 561.0.0
CPUs: 1
Total Memory: 3.68 GiB
Name: core-01
ID: TM2L:NIZI:CUGT:EUKX:ACP3:EOFX:YQVR:CTL7:R7L2:ILQF:6E3H:HAHQ
Kernel Config:
core@core-01 ~ $ wget https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh
...
2015-01-19 11:09:00 (133 MB/s) - 'check-config.sh' saved [4476/4476]
core@core-01 ~ $ chmod a+x check-config.sh
core@core-01 ~ $ ./check-config.sh
info: reading kernel config from /proc/config.gz ...
Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_MACVLAN: enabled
- CONFIG_VETH: enabled
- CONFIG_BRIDGE: enabled
- CONFIG_NF_NAT_IPV4: enabled
- CONFIG_IP_NF_FILTER: enabled
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled
- CONFIG_NF_NAT: enabled
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled
Optional Features:
- CONFIG_MEMCG_SWAP: enabled
- CONFIG_RESOURCE_COUNTERS: enabled
- CONFIG_CGROUP_PERF: enabled
- Storage Drivers:
- "aufs":
- CONFIG_AUFS_FS: missing
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- "btrfs":
- CONFIG_BTRFS_FS: enabled
- "devicemapper":
- CONFIG_BLK_DEV_DM: enabled
- CONFIG_DM_THIN_PROVISIONING: enabled
- CONFIG_EXT4_FS: enabled
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- "overlay":
- CONFIG_OVERLAY_FS: enabled
Activity
jessfraz commentedon Jan 19, 2015
I was under the impression coreos used btrfs as the backing filesystem.
On Mon, Jan 19, 2015 at 3:16 AM, Tatsuya Kawano [email protected]
wrote:
unclejack commentedon Jan 19, 2015
Overlay is currently experimental and not officially supported.
CentOS 6.x has user space tooling and configuration that's only supported with the provided kernel, 2.6.32. We can't provide support for custom kernels on this distribution - nor on RHEL or any other RHEL/CentOS derived distribution.
Please take a look at these comments for more information:
comment from me on the matter: #9696 (comment)
official comment from jperrin who works on CentOS: #9696 (comment)
Overlay has some known problems and I wouldn't be surprised to track down these problems to the following overlay related problems:
#9572
#9874
#10169
I'm going to close this issue now because 1) we're tracking overlay issues in multiple other issues already 2) this overlay problem is reported on an unsupported setup - CentOS 6 with custom kernel
Debian jessie with kernel 3.18.x, Ubuntu 14.04/14.10 with kernel 3.18.x and Fedora with kernel 3.18.x would be better setups for testing overlay.
tatsuya6502 commentedon Jan 19, 2015
Here is the release notes of the CoreOS release I'm using.
More info will be found here.
CoreOS looks to move from Btrfs to overlayfs
unclejack commentedon Jan 19, 2015
@tatsuya6502 I apologize, I was under the impression you're on CentOS.
[-]CentOS 6 on docker + overlayfs fails to run yum install with a strange file checksum error[/-][+]docker + overlayfs fails to run container with a strange file checksum error[/+][-]docker + overlayfs fails to run container with a strange file checksum error[/-][+]overlayfs fails to run container with a strange file checksum error[/+]tatsuya6502 commentedon Jan 19, 2015
@unclejack That's ok. I think the issue title I put was confusing.
jessfraz commentedon Jan 19, 2015
So overlay is currently an experimental graphdriver, there are some known issues with tests failing we are working on see #9874.
I wonder if this has anything to do with those.
tatsuya6502 commentedon Jan 19, 2015
@unclejack btw, thanks for the pointers for these issues. I'll take a look.
tatsuya6502 commentedon Jan 19, 2015
@jfrazelle Thanks for the info. I think this issue may be related to the following test case as my problem only happens after switching containers. (Run a container, modify the image, stop the container, run a new container with the image, try to modify the image -> error)
#9874
porjo commentedon Feb 27, 2015
I use CoreOS and have just switched from Btrfs to Ext4 and I having the same issue. I was also seeing errors like this:
I found that inserting
RUN rpm --rebuilddbprior toyum install -y <pkg>resolved both errors, however that should not be necessary.marineam commentedon Feb 27, 2015
iirc Linux 3.19 or 4.0 adds support for multiple read-only layers in overlayfs which could allow using overlayfs to handle stacking layers instead of re-copying the whole filesystem tree in every layer.
112 remaining items
xiaoshengaimm commentedon Dec 10, 2016
i got this issue too. however
plugins=1in/etc/yum.confandRUN yum install -y yum-plugin-ovlboth not work for me.my host system is
7.2.1511with4.4.9-1.el7.elrepo.x86_64docker version
1.11.1with overlayfsbuild image from centos 6.6.....
alanfranz commentedon Dec 10, 2016
@xiaoshengaimm post your Dockerfile. Also, please be advised that plugins=1 and yum-plugin-ovl must be employed together, not alternatively. The first command enables plugins, the second installs the plugin to support overlay.
centos 6.6 is an old centos release (two years old, I think?) and most probably the fix is not baked in that image. Use the latest centos:6 release and most probably you won't experience any issue out of the box, as long as plugins=1 is in yum.conf.
jamshid commentedon Dec 23, 2016
@jperrin did something change recently with the centos builds? I swear the "yum" checksum problem with overlay2 was fixed before I made a recent docker pull of centos.
Maybe yum-utils used to include yum-plugin-ovl but it no longer does?
This is necessary for overlayfs to work, please add yum-plugin-ovl back in. I guess I should file another bug please let me know what project.
libpda_slc6 Dockerfile: rebuilddb before yum
yum bug fix moby/moby#10180
MattGat commentedon Apr 25, 2017
I have the same issue with Docker version 17.03.1-ce, build c6d412e and CENTOS 7
RUN rpm --rebuilddb && yum install -y XXX => This solution has resolved this issue
Workaround the docker bug when compiling artifacts
Work around for moby/moby#10180
Add yum plugin for overlayfs
workaround moby/moby/issues/10180
orodbhen commentedon Apr 2, 2018
If you're unable to install the
yumplugin because of dependency conflicts (e.g. an older base image), You can work around this withtouch /var/lib/rpm/*. See the bug report for details.working on #91 touch /var/lib/rpm/*
Fix for yum overlay problem.