docker lxc driver fails

Bug #1466550 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
docker.io (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
Fix Released
Medium
Kick In

Bug Description

[Impact]

 * This bug breaks lxc engine support of docker.

 * There is an upstreamed fix issued to manage newer version of LXC, which enable lxc.autodev by default.

 * patch is lxc.autodev-support.patch that is a cherry-pick of https://github.com/docker/docker/commit/6089e679a2fb2494fd3e599a9eab9327e6a509fc

[Test Case]

 * To reproduce the bug:

  on a fresh vivid server:
    sudo apt-get install -y lxc docker.io
  edit /dev/default/docker:
    DOCKER_OPTS="-e lxc"

  restart docker-daemon service:
    sudo service docker start (see bug: LP: #1459916)

  ensure docker is running with the correct options with ps or docker:
    sudo ps -ef | grep docker
    root 20458 1 0 07:48 ? 00:00:19 /usr/bin/docker -d -H fd:// -e lxc
    sudo docker info | grep lxc:
    Execution Driver: lxc-1.1.2
    WARNING: No swap limit support

  pull a docker image (amd64):
    docker pull ubuntu:latest

 after download is successfull:
 it will fail to start like reported:

  ubuntu@vd2:~$ sudo docker run -it ubuntu:latest /bin/bash
  Unable to find image 'ubuntu:latest' locally
  Pulling repository ubuntu
  6d4946999d4f: Download complete
  428b411c28f0: Download complete
  435050075b3f: Download complete
  9fd3c8c9af32: Download complete
  Status: Image is up to date for ubuntu:latest
  lxc-start: lxc_start.c: main: 344 The container failed to start.
  lxc-start: lxc_start.c: main: 346 To get more details, run the container in foreground mode.
  lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
  FATA[0015] Error response from daemon: Cannot start container 5b7ee6181a49a1fa5c6ac47eab666ea05611f6f7f8b3610bfacb9a150c966501: Container is not running

( for bandwidth consideration, you might want to save the downloaded image for other testing,
    sudo docker images
    sudo docker save -o ubuntu_latest.tar ubuntu:latest
    bzip2 ubuntu_latest.tar,

    to reload it on an other sytem:
    sudo docker load -i ubuntu_latest.tar.bz2
    sudo run -it ubuntu:latest /bin/bash
)

* To verify the fix:

Now, restart a fresh vivid server,
  install the new proposed package
  sudo apt-get install -y lxc

  sudo service docker stop
  edit /etc/default/docker (DOCKER_OPTS="-e lxc")
  sudo service docker start

   ensure docker is running with the correct options with ps or docker:
    sudo ps -ef | grep docker
    root 20458 1 0 07:48 ? 00:00:19 /usr/bin/docker -d -H fd:// -e lxc

    sudo docker info | grep lxc:
    Execution Driver: lxc-1.1.2
    WARNING: No swap limit support

 sudo docker run -it ubuntu:latest /bin/bash
    Unable to find image 'ubuntu:latest' locally
    latest: Pulling from ubuntu
    428b411c28f0: Already exists
    435050075b3f: Already exists
    9fd3c8c9af32: Already exists
    6d4946999d4f: Already exists
    Digest: sha256:45e42b43f2ff4850dcf52960ee89c21cda79ec657302d36faaaa07d880215dd9
    Status: Image is up to date for ubuntu:latest
    root@e433f427c0f2:/# lsb_release -c
    Codename: trusty
    root@e433f427c0f2:/# exit

[Original Description]

Start docker daemon with "-e lxc" option.

pulll & run ubuntu image.

Expect to get a bash prompt, instead I get:

$ docker run -ti ubuntu bash
lxc-start: conf.c: mount_entry: 1711 No such file or directory - failed to mount '/dev/pts/5' on '/usr/lib/x86_64-linux-gnu/lxc//dev/console'
lxc-start: conf.c: lxc_setup: 3831 failed to setup the mount entries for '9b33b115f6ba2f4882f79745f1c8397b4f57ef3547fea30cfb01b3d03acd2f6c'
lxc-start: start.c: do_start: 699 failed to setup the container
lxc-start: sync.c: __sync_wait: 51 invalid sequence number 1. expected 2
lxc-start: start.c: __lxc_start: 1164 failed to spawn '9b33b115f6ba2f4882f79745f1c8397b4f57ef3547fea30cfb01b3d03acd2f6c'
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

Revision history for this message
Kick In (kick-d) wrote :

HI,

Can you specify which ubuntu release and which version of docker?

lsb_release -c
dpkg -l | grep docker.io

Thanks.

Revision history for this message
Kick In (kick-d) wrote :

I could reproduce on a vivid host and docker-1.6.2. You are getting Apparmor denials. Check syslog
cat /var/log/syslog | grep DENIED

Revision history for this message
Kick In (kick-d) wrote :

Sorry I missread my syslog, apparmor denials were not related to docker.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Kick In (kick-d)
Changed in docker.io (Ubuntu Vivid):
status: New → In Progress
assignee: nobody → Kick In (kick-d)
importance: Undecided → Medium
Kick In (kick-d)
Changed in docker.io (Ubuntu Vivid):
milestone: none → vivid-updates
milestone: vivid-updates → none
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package docker.io - 1.6.2~dfsg1-1ubuntu2

---------------
docker.io (1.6.2~dfsg1-1ubuntu2) wily; urgency=medium

  * Add patches
    - d/p/lxc.autodev-support.patch: fix bug: LP: #1466550
      Make LXC exec driver compatible with recent lxc where lxc.autodev is enabled
      by default.
    - d/p/update-go.net-golang.org.patch: fix FTBS bug from wily

 -- Pierre-Andre MOREY <email address hidden> Thu, 25 Jun 2015 17:54:08 +0200

Changed in docker.io (Ubuntu):
status: New → Fix Released
Kick In (kick-d)
description: updated
Kick In (kick-d)
description: updated
Kick In (kick-d)
description: updated
description: updated
Kick In (kick-d)
Changed in docker.io (Ubuntu Vivid):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.