You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Overlayfs does not work with unix domain sockets #12080
This issue (unix sockets not working) affects the container's root filesystem, including /var/ and /tmp folders. But not any kind of a volume (either type). So long as that volume's underlying filesystem is 'normal' for linux and will permit the creation of working sockets.
Ah right. Ok then. That is the newest linux kernel filesystem, to replace device mapper & aufs in the future. Sorry I was confused by the title. Because some of us use the word 'overlay' to refer to something else entirely.
"overlayfs does not work with unix domain sockets"
bash-4.3# strace -o /log -fff supervisord -k -c /etc/supervisord.conf
2015-05-13 15:52:08,211 CRIT Supervisor running as root (no user in config file)
2015-05-13 15:52:08,338 INFO RPC interface 'supervisor' initialized
2015-05-13 15:52:08,339 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-05-13 15:52:08,341 INFO supervisord started with pid 22
2015-05-13 15:52:09,350 INFO spawned: 'test-unix-domain-socket' with pid 25
2015-05-13 15:52:10,354 INFO success: test-unix-domain-socket entered RUNNING state, process has stayed up for> than 1 seconds (startsecs)
2015-05-13 15:52:10,436 INFO exited: test-unix-domain-socket (exit status 0; expected)
^C2015-05-13 15:53:24,850 WARN received SIGINT indicating exit request
bash-4.3# supervisord -k -c /etc/supervisord.conf
2015-05-13 15:53:42,591 CRIT Supervisor running as root (no user in config file)
2015-05-13 15:53:42,664 INFO RPC interface 'supervisor' initialized
2015-05-13 15:53:42,665 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-05-13 15:53:42,665 INFO supervisord started with pid 51
2015-05-13 15:53:43,671 INFO spawned: 'test-unix-domain-socket' with pid 54
2015-05-13 15:53:43,996 INFO exited: test-unix-domain-socket (exit status 0; not expected)
2015-05-13 15:53:45,002 INFO spawned: 'test-unix-domain-socket' with pid 58
2015-05-13 15:53:45,326 INFO exited: test-unix-domain-socket (exit status 0; not expected)
2015-05-13 15:53:47,333 INFO spawned: 'test-unix-domain-socket' with pid 62
2015-05-13 15:53:47,663 INFO exited: test-unix-domain-socket (exit status 0; not expected)
2015-05-13 15:53:50,672 INFO spawned: 'test-unix-domain-socket' with pid 66
2015-05-13 15:53:51,007 INFO exited: test-unix-domain-socket (exit status 0; not expected)
2015-05-13 15:53:52,009 INFO gave up: test-unix-domain-socket entered FATAL state, too many start retries too quickly
^C2015-05-13 15:53:56,395 WARN received SIGINT indicating exit request
bash-4.3#
Why was this removed from 1.7.0? We are currently stuck in a situation where no storage backend is able to fulfill our needs, and this is one of the blockers for us for Overlay...
@stevenbrichards we were really hoping to get overlay as the default graph driver in 1.7, but there are several issues around overlay remaining; some of them are caused by bugs in overlay itself so cannot be solved by docker, but need to be fixed in the kernel first.
Rest assured that improving overlay is top priority in docker, but getting it resolved before the 1.7 release just wasn't possible.
On a brighter note; starting with the 1.7 release, there will be an "experimental" docker release, with a nightly or weekly release (undecided yet). That release will be used to test upcoming features before they end up in the official release. So, once this is fixed, you'll be able to test it in that release.
@srinivassurishetty that looks like RHEL numbering. If that's the case, then it is old even by RHEL standards (something like RHEL 7.2). This bug has been fixed in more recent RHEL - make sure you use an up to date RHEL and an xfs volume that has ftype=1 (c.f. output of xfs_info <device>), especially if you are not using a dedicated volume for /var/lib/docker/overlay, as RHEL historically had ftype=0 for the root device.
Activity
dreamcat4 commentedon Apr 4, 2015
@analytically Can you please summarize what this bug is?
analytically commentedon Apr 4, 2015
Unix domain sockets don't seem to work when using overlayfs. When using device mapper, it works fine.
dreamcat4 commentedon Apr 4, 2015
Ah right. Ok then. That is the newest linux kernel filesystem, to replace device mapper & aufs in the future. Sorry I was confused by the title. Because some of us use the word 'overlay' to refer to something else entirely.
"overlayfs does not work with unix domain sockets"
cpuguy83 commentedon Apr 6, 2015
Just doing a simple go program with a unix socket listener works for me.
LK4D4 commentedon Apr 6, 2015
I can reproduce with image from @analytically
[-]Overlay doesn't work with unix domain sockets[/-][+]Overlayfs does not work with unix domain sockets[/+]vbatts commentedon May 13, 2015
hahah, of course debugging is great.
stevenschlansker commentedon Jun 5, 2015
Why was this removed from 1.7.0? We are currently stuck in a situation where no storage backend is able to fulfill our needs, and this is one of the blockers for us for Overlay...
thaJeztah commentedon Jun 5, 2015
@stevenbrichards we were really hoping to get overlay as the default graph driver in 1.7, but there are several issues around overlay remaining; some of them are caused by bugs in overlay itself so cannot be solved by docker, but need to be fixed in the kernel first.
Rest assured that improving overlay is top priority in docker, but getting it resolved before the 1.7 release just wasn't possible.
On a brighter note; starting with the 1.7 release, there will be an "experimental" docker release, with a nightly or weekly release (undecided yet). That release will be used to test upcoming features before they end up in the official release. So, once this is fixed, you'll be able to test it in that release.
thaJeztah commentedon Jun 5, 2015
Oops, wrong autocomplete; meant to use @stevenschlansker (apologies)
48 remaining items
abhikandoi2000 commentedon Jan 30, 2017
Anyone facing this issue on macOS Sierra (version 10.12.1) while using Docker Version 1.13.0 (15072)?
ChiragChhatbar-zz commentedon Feb 11, 2017
I faced this issue in CentOS 7
Docker version 1.13.1, build 092cba3
FAKERINHEART commentedon Mar 3, 2018
@analytically This is because the hard link to a domain socket file can not work in overlay fs.
Supervisor/supervisor#1067
srinivassurishetty commentedon May 21, 2018
Issue seen on 3.10.0-327.36.3.el7.x86_64, is this back ported to any 3.10 series kernel?
cpuguy83 commentedon May 21, 2018
@srinivassurishetty 3.10.0-327 is quite old. Please make sure to update the kernel to the latest for the distro.
EricMountain-1A commentedon May 22, 2018
@srinivassurishetty that looks like RHEL numbering. If that's the case, then it is old even by RHEL standards (something like RHEL 7.2). This bug has been fixed in more recent RHEL - make sure you use an up to date RHEL and an xfs volume that has ftype=1 (c.f. output of
xfs_info <device>), especially if you are not using a dedicated volume for /var/lib/docker/overlay, as RHEL historically had ftype=0 for the root device.srinivassurishetty commentedon May 22, 2018
Thanks you @cpuguy83 @EricMountain-1A for comments.
Found the root cause.
@EricMountain-1A as you pointed out the problem with overlayfs and same kernel works with devicemapper.
root cause.
By default Ansible creates the SSH control sockets under ~/.ansible/cp directory.
Creation of socket will not work well with overlayfs (docker driver limitation given link below). So changed the control socket directory path and working fine across all storage drivers and kernels.
https://docs.docker.com/storage/storagedriver/overlayfs-driver/
Docker also recommending to not use the < 3.10.0-514 version to use overlay2 storage driver.
[ssh_connection]
control_path_dir=/vol/
Change supervisord sock file dir to /dev/shm because of overlayfs iss…
Fix for overlay filesystem issue in docker, on Mac OSX
libvm: Use shared memory for SSH control socket instead of tempfs
libvm: Use shared memory for SSH control socket instead of tmpfs
libvm: Use shared memory for SSH control socket instead of /var/tmp
libvm: Use shared memory for SSH control socket instead of /var/tmp
libvm: Use shared memory for SSH control socket instead of /var/tmp
libvm: Use shared memory for SSH control socket instead of /var/tmp