Ask Your Question
1

OVS qvb port overwrites deafault route and disrupts host (not VM) access to/from outside world

asked 2016-01-12 13:18:13 -0500

tshayan gravatar image

Hello OpenStackers.. Long time reader, first time writer.

Environment

I have implemented a POC OpenStack environment at home by following the official OpenStack guide for Kilo, on a single machine with a single NIC. So far I have installed Keystone, Glance, Nova and Neutron (with a simple flat network) and with a few workarounds was able to successfully launch an instance.

Problem

After creating my first instance, the OVS qvb port obtained an IP address through DHCP and overwrote the default route in the routing table. Example:

Before creating an instance:

$ ip route
default via 192.168.1.1 dev br-eth0 
169.254.0.0/16 dev br-eth0  scope link  metric 1000 
192.168.1.0/24 dev br-eth0  proto kernel  scope link  src 192.168.1.151 
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1

After creating an instance:

$ ip route
default via 192.168.1.1 dev qvbb5c01773-e5  proto static 
169.254.0.0/16 dev br-eth0  scope link  metric 1000 
192.168.1.0/24 dev br-eth0  proto kernel  scope link  src 192.168.1.151 
192.168.1.0/24 dev qvbac655bd3-39  proto kernel  scope link  src 192.168.1.111  metric 1 
192.168.1.0/24 dev qvbb5c01773-e5  proto kernel  scope link  src 192.168.1.109  metric 1 
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1

This behaviour causes the traffic from host (which runs on br-eth0) to be blocked to and from the outside world, while the VM's do have access both internally and externally.

Note: A VM does not have to be started for this to happen. It only has to be created.

Workaround

I have been able to fix this by adding an entry to the crontab so that a few seconds after boot, it will manually add a route back to the table:

@reboot sleep 60; sudo route add default gw 192.168.1.1 br-eth0 > /tmp/route_add.out

This changes the routing table to the following which grants external access to the host:

$ ip route
default via 192.168.1.1 dev br-eth0 
default via 192.168.1.1 dev qvbb5c01773-e5  proto static 
169.254.0.0/16 dev br-eth0  scope link  metric 1000 
192.168.1.0/24 dev br-eth0  proto kernel  scope link  src 192.168.1.151 
192.168.1.0/24 dev qvbac655bd3-39  proto kernel  scope link  src 192.168.1.111  metric 1 
192.168.1.0/24 dev qvbb5c01773-e5  proto kernel  scope link  src 192.168.1.109  metric 1 
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1

Question

Could someone please shed some light on this behaviour? Am I correct in assuming that this is happening since I am only using a single interface for everything?

Thank you in advance.

Here are some outputs for reference:

$ cat /etc/network/interfaces

auto lo
iface lo inet loopback ...
(more)
edit retag flag offensive close merge delete

Comments

1

the question is why is a dhcp client running on these interfaces. My guess is that you are running a desktop edition with networkmanager.

darragh-oreilly gravatar imagedarragh-oreilly ( 2016-01-14 14:01:13 -0500 )edit

You guess was correct. and after removing network manager it stopped doing that. Thanks =)

tshayan gravatar imagetshayan ( 2016-01-14 19:15:35 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-01-14 19:17:29 -0500

tshayan gravatar image

Removing network manager solved the problem. Thank @darragh-oreilly

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: 2016-01-12 13:18:13 -0500

Seen: 98 times

Last updated: Jan 14 '16