Ask Your Question
1

Docker InstanceDeployFailure: Cannot create container

asked 2014-10-09 07:36:58 -0600

updated 2014-10-22 07:34:09 -0600

Hy guys, I'm trying docker openstack integration following this guide.

I'm getting the following error whenever I try to start a new doker based VM:

2014-10-09 14:19:24.750 31722 TRACE nova.compute.manager [instance: e58a1c9f-0a5b-48cb-a2c0-831b79a05a86] InstanceDeployFailure: Cannot create container

Docker alone correctly works.

My infrastructure is based on a RDO allinone host, with another CentOS host acting as additional compute node for Docker images. I configured the latter as the guide indicates. All services seems to communicate with each others.

I added a property to the docker image in glance in order to spawn only in the docker based host:

glance image-update --property hypervisor_type="docker" <image-ID>

Any help on how to solve the problem?

ISSUE UPDATE

I found, putting some logs into the driver, specifically in file /usr/lib/python2.6/site-packages/novadocker/virt/docker/client.py that when the driver try to execute this call:

POST containers/create 

request.body    {"Hostname": "instance-000000e1", "PortSpecs": [], "Cmd": [], "StdinOnce": false, "Dns": null, "AttachStdin": false, "Volumes": {}, "Memory": 2147483648, "MemorySwap": 0, "VolumesFrom": "", "OpenStdin": true, "Tty": true, "CpuShares": 1024, "Image": "centos", "Env": null, "NetworkDisabled": true, "User": "", "AttachStderr": false, "AttachStdout": false}

It gets a response.code 500 with the following body: No command specified

ISSUE UPDATE 2

I pulled another image (ipache) from docker repository and I uploaded it to glance. Now, trying to spawn a container from that instance, I get another error:

POST containers/create 
request.body{"Hostname": "instance-000000e8", "PortSpecs": [], "Cmd": [], "StdinOnce": false, "Dns": null, "AttachStdin": false, "Volumes": {}, "Memory": 2147483648, "MemorySwap": 0, "VolumesFrom": "", "OpenStdin": true, "Tty": true, "CpuShares": 1024, "Image": "hipache", "Env": null, "NetworkDisabled": true, "User": "", "AttachStderr": false, "AttachStdout": false}

I get now a 201 response.code, but I see the following error:

2014-10-10 14:28:48.668 21308 ERROR nova.compute.manager [req-c7c9a6a4-ddae-4fa4-8ea1-0367452473ef 2d68f446ed2c492d83c7c8119e5f3f4c 78cae9df849e47d6a3fe4d92f3849100] [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02] Instance failed to spawn
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02] Traceback (most recent call last):
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1738, in _spawn
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]     block_device_info)
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]   File "/usr/lib/python2.6/site-packages/novadocker/virt/docker/driver.py", line 299, in spawn
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]     container_id = self._create_container(instance, args)
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]   File "/usr/lib/python2.6/site-packages/novadocker/virt/docker/driver.py", line 480, in _create_container
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]     return self.docker.create_container(args, name)
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]   File "/usr/lib/python2.6/site-packages/novadocker/virt/docker/client.py", line 176, in create_container
2014-10-10 14:28:48.668 21308 TRACE nova.compute.manager [instance: aa86a12e-41e1-43e0-b9ff-ca263de88d02]     for k, v in obj.iteritems():
2014-10-10 14:28:48.668 21308 TRACE nova.compute ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2015-01-04 23:05:30 -0600

updated 2015-03-05 12:24:01 -0600

larsks gravatar image

Did you try run docker in debug mode (docker --debug=true -d)? I have same problem and when I run docker in debug mode I saw image not found because I added docker images to glance in controller node and docker in compute nodes can't see them!

edit flag offensive delete link more
0

answered 2015-01-28 04:54:01 -0600

If you still see this issue, you may want to try: 1. If you are on VM or older kernels, this helps: Add following in the below file: #vi /etc/sysconfig/docker other_args="--exec-driver=lxc” Restart docker using the command service docker restart

  1. From Docker compute node, pulling the image and importing to glance, for example ubuntu image:

docker save ubuntu | glance image-create --is-public=True --container-format=docker --diskformat=raw --name ubuntu

You will have to set the Openstack attributes on compute: export OS_AUTH_URL= export OS_USERNAME= export OS_TENANT_NAME= export OS_PASSWORD=

to execute above command. Once you do that, image should show up in glance (if things are fine). Now try deploying it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-10-09 07:36:58 -0600

Seen: 1,382 times

Last updated: Mar 05 '15