docker swarm create fails when tar can't find container file system

I’m running docker on a CentOS VM. Some version information:

Linux cmodqa.lab.c-cor.com 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

  • Docker Windows send build context fails if over 80Mb
  • node.js docker image for all environments - including production
  • Migration from MySQL to postgresql using Django and Docker - relation “authtoken_token” does not exist
  • Docker swarm deployment takes time and causes container to kill the service
  • How to use Docker's COPY/ADD instructions to copy a single file to an image
  • Authentication issue in Docker-MongoDB
  • [root@xxx ~]# docker version
    Client version: 1.6.0
    Client API version: 1.18
    Go version (client): go1.4.2
    Git commit (client): 8aae715/1.6.0
    OS/Arch (client): linux/amd64
    Server version: 1.6.0
    Server API version: 1.18
    Go version (server): go1.4.2
    Git commit (server): 8aae715/1.6.0
    OS/Arch (server): linux/amd64

    Ran this command, as root:

    TOKEN=$(docker run –rm swarm create)

    Returns:

    Timestamp: 2015-05-29 09:26:25.967347311 -0700 PDT
    Code: System error

    Message: [/usr/bin/tar -cf /var/lib/docker/tmp/c77446605e81944d4fb0d09a68339d2026db2b2af100/_tmp.tar -C /var/lib/docker/devicemapper/mnt/c77446605e81944d4fb0d09a68339d2026db2b2afs/tmp .] failed: /usr/bin/tar: /var/lib/docker/devicemapper/mnt/c77446605e81944d4fb0d09a6cb119e60ff/rootfs/tmp: Cannot chdir: No such file or directory
    /usr/bin/tar: Error is not recoverable: exiting now
    : exit status 2

    Frames:

    0: setupRootfs
    Package: github.com/docker/libcontainer

    File: rootfs_linux.go@30

    1: Init
    Package: github.com/docker/libcontainer.(*linuxStandardInit)

    File: standard_init_linux.go@52

    2: StartInitialization
    Package: github.com/docker/libcontainer.(*LinuxFactory)

    File: factory_linux.go@223

    3: initializer
    Package: github.com/docker/docker/daemon/execdriver/native

    File: init.go@35

    4: Init
    Package: github.com/docker/docker/pkg/reexec

    File: reexec.go@26

    5: main
    Package: main

    File: docker.go@29

    6: main
    Package: runtime

    File: proc.go@63

    7: goexit
    Package: runtime
    File: asm_amd64.s@2232
    time=”2015-05-29T09:26:27-07:00″ level=fatal msg=”Error response from daemon: : exit stat

    The file system location the tar command is trying to read from doesn’t exist:

    [root@cmodqa system]# ls -l /var/lib/docker/devicemapper/mnt/c77446605e81944d4fb0d09a68339d2026db2b2af1335a8a6395b1cb119e60ff/rootfs/tmp
    ls: cannot access /var/lib/docker/devicemapper/mnt/c77446605e81944d4fb0d09a68339d2026db2b2af1335a8a6395b1cb119e60ff/rootfs/tmp: No such file or directory

    In fact:

    ls -l /var/lib/docker/devicemapper/mnt/c77446605e81944d4fb0d09a68339d2026db2b2af1335a8a6395b1cb119e60ff
    total 0

    The rootfs for the container doesn’t seem to be there. (Does it disappear after the container stops?)

    I’ve run this a few times. Same result.

  • Tensorflow on Docker: How to save the work on Jupyter notebook?
  • Docker hangs on the RUN command OSX
  • “Caching” intermediate Docker build
  • DevOps: automatically restarting a failed container
  • What is the docker registry v2 API endpoint to get the digest for an image?
  • How do I not create docker container logs?
  • One Solution collect form web for “docker swarm create fails when tar can't find container file system”

    I did some further digging, on docker’s repository on Git.

    This is a known issue, apparently based in Red Hat’s packaging of Docker, and it effects more than swarm.

    A bug was filed with Redhat:

    https://bugzilla.redhat.com/show_bug.cgi?id=1213258

    Use Docker 1.5.0 to work around this situation.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.