Skip to content

Overlayfs does not work with unix domain sockets #12080

Closed

Description

@analytically

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.

See https://github.com/analytically/docker-overlayfs-bug

Activity

  1. dreamcat4 commented on Apr 4, 2015

    @dreamcat4

    @analytically Can you please summarize what this bug is?

  2. analytically commented on Apr 4, 2015

    @analytically
    Author

    Unix domain sockets don't seem to work when using overlayfs. When using device mapper, it works fine.

  3. dreamcat4 commented on Apr 4, 2015

    @dreamcat4

    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"

  4. added
    kind/bug
    on Apr 4, 2015
  5. cpuguy83 commented on Apr 6, 2015

    @cpuguy83
    Member

    Just doing a simple go program with a unix socket listener works for me.

  6. LK4D4 commented on Apr 6, 2015

    @LK4D4
    Contributor

    I can reproduce with image from @analytically

  7. changed the title [-]Overlay doesn't work with unix domain sockets[/-] [+]Overlayfs does not work with unix domain sockets[/+] on Apr 7, 2015
  8. added this to the 1.7.0 milestone on Apr 13, 2015
  9. vbatts commented on May 13, 2015

    @vbatts
    Contributor

    hahah, of course debugging is great.

    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# 
  10. removed this from the 1.7.0 milestone on May 28, 2015
  11. stevenschlansker commented on Jun 5, 2015

    @stevenschlansker

    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...

  12. thaJeztah commented on Jun 5, 2015

    @thaJeztah
    Member

    @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.

  13. thaJeztah commented on Jun 5, 2015

    @thaJeztah
    Member

    Oops, wrong autocomplete; meant to use @stevenschlansker (apologies)

  14. added this to the 1.8.0 milestone on Jun 5, 2015
  15. 48 remaining items

  16. abhikandoi2000 commented on Jan 30, 2017

    @abhikandoi2000

    Anyone facing this issue on macOS Sierra (version 10.12.1) while using Docker Version 1.13.0 (15072)?

  17. ChiragChhatbar-zz commented on Feb 11, 2017

    @ChiragChhatbar-zz

    I faced this issue in CentOS 7
    Docker version 1.13.1, build 092cba3

  18. FAKERINHEART commented on Mar 3, 2018

    @FAKERINHEART

    @analytically This is because the hard link to a domain socket file can not work in overlay fs.
    Supervisor/supervisor#1067

  19. srinivassurishetty commented on May 21, 2018

    @srinivassurishetty

    Issue seen on 3.10.0-327.36.3.el7.x86_64, is this back ported to any 3.10 series kernel?

  20. cpuguy83 commented on May 21, 2018

    @cpuguy83
    Member

    @srinivassurishetty 3.10.0-327 is quite old. Please make sure to update the kernel to the latest for the distro.

  21. EricMountain-1A commented on May 22, 2018

    @EricMountain-1A

    @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.

  22. srinivassurishetty commented on May 22, 2018

    @srinivassurishetty

    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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/kernelarea/storage/overlaykind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions