nova-docker containers can't ping outside

asked 2016-02-18 08:43:10 -0600

raimonbosch gravatar image

updated 2016-02-18 08:55:27 -0600

Hi!

I am using nova-docker to create containers throught openstack but new containers don't get any connectivity. I think it is because the gateway it's wrong (it uses .1 instead of the ip of the compute node).

Destination - Gateway - Genmask - Flags Metric Ref Use - Iface

0.0.0.0 - 172.16.100.1 - 0.0.0.0 - UG 0 0 0 - nsf6c6e5bc-e9

172.16.100.0 - 0.0.0.0 - 255.255.255.0 - U 0 0 0 - nsf6c6e5bc-e9

In this case the gateway that holds connectivity is 172.16.100.5. That's the one that it is assigned by Openstack on eth0 when I fire up regular virtual machines. What is going on nova-docker that generates this wrong gateway? Any ideas about how to solve this?

edit retag flag offensive close merge delete

Comments

I could solve it by running:

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

on 172.16.100.1

but it's still the wrong gateway. Docker containers should get connectivity through its compute node (in this case 172.16.100.5).

raimonbosch gravatar imageraimonbosch ( 2016-02-18 09:03:25 -0600 )edit