Revision history [back]

click to hide/show revision 1
initial version

Docker and tenant GRE network

Hello everybody,

At the moment I try out Docker for Openstack Kilo. But now I've problems with Docker and neutron: When I want to deploy a docker container in a tenant network it will fail with:

Failed to perform requested operation on instance "XYZ", the instance has an error status: Please try again later [Error: No valid host was found. There are not enough hosts available.]

Looking in the nova-compute.log shows

2015-08-11 12:30:19.303 1980 WARNING novadocker.virt.docker.driver [-] [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Cannot setup network: Unexpected vif_type=binding_failed
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Traceback (most recent call last):
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 405, in _start_container
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     self.plug_vifs(instance, network_info)
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 197, in plug_vifs
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     self.vif_driver.plug(instance, vif)
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/vifs.py", line 70, in plug
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     _("Unexpected vif_type=%s") % vif_type)
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] NovaException: Unexpected vif_type=binding_failed
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]
2015-08-11 12:30:19.392 1980 ERROR nova.compute.manager [-] [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Instance failed to spawn
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Traceback (most recent call last):
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2442, in _build_resources
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     yield resources
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2314, in _build_and_run_instance
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     block_device_info=block_device_info)
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 448, in spawn
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     self._start_container(container_id, instance, network_info)
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 414, in _start_container
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     instance_id=instance['name'])
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] InstanceDeployFailure: Cannot setup network: Unexpected vif_type=binding_failed

"Cannot setup network: Unexpected vif_type=binding_failed" brings me to the neutron-server.log which tells me

Failed to bind port f73dd854-a3bc-430f-beef-9f92454584f0 on host docker

Turning debug on the I got this mesage too:

Network 42a72687-1567-4499-8328-dca8c331dbf6 is of type gre but agent docker or mechanism driver only support ['local', 'flat', 'vlan']

So far, so bad! The ml2_conf.ini on the docker host contains

[ml2]
type_drivers = flat,gre
tenant_network_types = gre
mechanism_drivers = openvswitch

The network, which the container should connects to, is a tenant network. I also have look at neutron is loading the ml2_conf.ini (It does!)

So is it possible that the novadocker.virt.docker.DockerDriver only supports local, flat, or vlan networks?

I also tried out to deploy a container directly on a external, flat network. And see there it works. But in my opinion it is a bad way to provide a external network for a non admin tenant for deploying docker container.

Is there any other way to provide docker container in a tenant network with neutron, so that non admin user could deploy containers without any pains?

Docker and tenant GRE network

Hello everybody,

At the moment I try out Docker for Openstack Kilo. But now I've problems with Docker and neutron: When I want to deploy a docker container in a tenant network it will fail with:

Failed to perform requested operation on instance "XYZ", the instance has an error status: Please try again later [Error: No valid host was found. There are not enough hosts available.]

Looking in the nova-compute.log shows

2015-08-11 12:30:19.303 1980 WARNING novadocker.virt.docker.driver [-] [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Cannot setup network: Unexpected vif_type=binding_failed
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Traceback (most recent call last):
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 405, in _start_container
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     self.plug_vifs(instance, network_info)
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 197, in plug_vifs
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     self.vif_driver.plug(instance, vif)
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/vifs.py", line 70, in plug
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     _("Unexpected vif_type=%s") % vif_type)
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] NovaException: Unexpected vif_type=binding_failed
2015-08-11 12:30:19.303 1980 TRACE novadocker.virt.docker.driver [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]
2015-08-11 12:30:19.392 1980 ERROR nova.compute.manager [-] [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Instance failed to spawn
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] Traceback (most recent call last):
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2442, in _build_resources
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     yield resources
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2314, in _build_and_run_instance
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     block_device_info=block_device_info)
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 448, in spawn
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     self._start_container(container_id, instance, network_info)
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 414, in _start_container
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099]     instance_id=instance['name'])
2015-08-11 12:30:19.392 1980 TRACE nova.compute.manager [instance: 1385483c-6d4c-4cd5-b1d3-0e1b17b87099] InstanceDeployFailure: Cannot setup network: Unexpected vif_type=binding_failed

"Cannot setup network: Unexpected vif_type=binding_failed" brings me to the neutron-server.log which tells me

Failed to bind port f73dd854-a3bc-430f-beef-9f92454584f0 on host docker

Turning debug on the I got this mesage too:

Network 42a72687-1567-4499-8328-dca8c331dbf6 is of type gre but agent docker or mechanism driver only support ['local', 'flat', 'vlan']

So far, so bad! The ml2_conf.ini on the docker host contains

[ml2]
type_drivers = flat,gre
tenant_network_types = gre
mechanism_drivers = openvswitch

The network, which the container should connects to, is a tenant network. I also have look at neutron is loading the ml2_conf.ini (It does!)

So is it possible that the novadocker.virt.docker.DockerDriver only supports local, flat, or vlan networks?

I also tried out to deploy a container directly on a external, flat network. And see there it works. But in my opinion it is a bad way to provide a external network for a non admin tenant for deploying docker container.

Is there any other way to provide docker container in a tenant network with neutron, so that non admin user could deploy containers without any pains?

By the way I use Ubuntu 14.04, and used this novadocker on stable/kilo branch. (thanks @dbaxps for mention that)