Ask Your Question
1

Instances don't get an IP from DHCP (Quantum, OVS, multi-node computes)

asked 2012-05-18 14:45:39 -0600

emilienm gravatar image

Hi,

Since 2 weeks, I've been looking for a solution with a Quantum + OVS issue.

The situation :

2 servers :

Essex-1 - Eth0 : 10.68.1.40 - ETH1 : connected to br-int OVS bridge -> Glance, Nova-*, Keystone, Horizon, Quantum-Server, KVM, OVS, Quantum-Agent -> nova.conf : https://github.com/EmilienM/doc-openstack/blob/master/Configuration%20Files/Essex-1/nova.conf (https://github.com/EmilienM/doc-opens...)

Essex-2 - Eth0 : 10.68.1.45 - ETH1 : connected to br-int OVS bridge -> nova-compute, KVM, Quantum-Agent -> nova.conf : https://github.com/EmilienM/doc-openstack/blob/master/Configuration%20Files/Essex-1/nova.conf (https://github.com/EmilienM/doc-opens...)

I've followed http://openvswitch.org/openstack/documentation/ (http://openvswitch.org/openstack/docu...) and http://docs.openstack.org/trunk/openstack-network/admin/content/ (http://docs.openstack.org/trunk/opens...)

I've created th network with : nova-manage network create --label=mysql --fixed_range_v4=192.168.113.0/24 --project_id=d2f0dc48a8944c6e96cb88c772376f06 --bridge=br-int --bridge_interface=eth1

What's not working : -> When I create an instance from dashboard, the VM does not get an IP from DHCP server (hosted on ESSEX-1). You can see the logs here : http://paste.openstack.org/show/17997/

What I did to investigate : -> dhcpdump -i br-int : I can see DHCPDISCOVER on both servers (without answers) -> ps -ef | grep dnsmasq : nobody 6564 1 0 14:12 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-0f427a46-3f.pid --listen-address=192.168.113.1 --except-interface=lo --dhcp-range=192.168.113.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-0f427a46-3f.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro root 6565 6564 0 14:12 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-0f427a46-3f.pid --listen-address=192.168.113.1 --except-interface=lo --dhcp-range=192.168.113.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-0f427a46-3f.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro root 16536 6192 0 14:40 pts/14 00:00:00 grep --color=auto dnsm

Is my nova.conf correct ? What's wrong with my configuration ? Is there a problem with DNSMASQ ?

I would apreciate any idea !

Regards

edit retag flag offensive close merge delete

26 answers

Sort by ยป oldest newest most voted
0

answered 2012-05-24 15:12:03 -0600

askstack gravatar image

Emilien This is only a single node setup with quantum+ovs. I will be working on a second node though.

edit flag offensive delete link more
0

answered 2012-05-24 15:25:49 -0600

emilienm gravatar image

Hi Askstack,

Can you share with me your configurations files (nova.conf, nova-compute.conf, OVS commands you did)

Thank's

edit flag offensive delete link more
0

answered 2012-05-18 17:17:40 -0600

danwent gravatar image

Oh, sorry, I was unclear. Its definitely possible to use OVS in a multi-node setup with VLANs. All I was saying is that with Essex there are some bugs with using OVS on multi-node with Tunneling (an alternative to VLANs), so using VLANs is your best option.

In the above setup, I would try tcpdumping on interface "gw-0f427a46-3f" to see if you see DHCP requests + responses. If you do, then I would tcpdump in the tap device associated with the VM to see if it is getting the reply. If it is not, I would then TCP dump on both of the physical NICs to see if you see the packet leaving the first physical server and arriving at the second.

This will help you figure out whether this is a guest issue, physical network issue, or OVS issue.

edit flag offensive delete link more
0

answered 2012-05-18 17:42:40 -0600

emilienm gravatar image

Tcpdump of gw-0f427a46-3f (gateway of my private network) :

http://paste.openstack.org/show/18007/

Note that fa:16:3e:42:e8:d0 is my instance.

Tcpdump of TAP device associated with the instance :

http://paste.openstack.org/show/18008/

edit flag offensive delete link more
0

answered 2012-05-28 09:02:32 -0600

emilienm gravatar image

Askstack, can you please show me your network configuration ?

In advance thank you.

edit flag offensive delete link more
0

answered 2012-05-18 20:24:11 -0600

danwent gravatar image

These two issues do seem similar. Both suggest that OVS is sending the DHCP request to dnsnmasq, but dnsmasq does not respond. Thus, it doesn't seem like a problem with OVS forwarding. Instead, it appears like QuantumManager in nova may not be correctly populating the host file for dnsmasq.

Emilien, can you post the content of the dnsmasq hosts file? Based on the output above it would be: /var/lib/nova/networks/nova-gw-0f427a46-3f.conf

Also, can you post the content of the fixed IPs table? The following should work if you insert your DB username and password:

mysql -u<user> -p<password> nova -e "Select address,instance_id,allocated from fixed_ips"

edit flag offensive delete link more
0

answered 2012-05-20 21:27:56 -0600

emilienm gravatar image

Ok, so we have the same problem.

Someone can confirm that my nova.conf (here :https://github.com/EmilienM/doc-openstack/blob/master/Configuration%20Files/Essex-1/nova.conf) is correct :

--flat_network_bridge=br-int

or maybe I need to change it withe something else ?

It's really strange, my configuration is basic : Dual-node with Quantum - OVS - KVM

edit flag offensive delete link more
0

answered 2012-05-21 08:19:04 -0600

hyunsun-moon gravatar image

Hello,

Have you guys set trunk mode on your physical switch? If not, try it. I also had to change VLAN_MIN / VLAN_MAX values on quantum/plugins/openvswitch/ovs_quantum_plugin.py to the values defined on my switch. It defaults to VLAN_MIN=1 / VLAN_MAX=4094. Guess these values would be set as a flag.

Hope this helps.

edit flag offensive delete link more
0

answered 2012-05-21 19:48:58 -0600

askstack gravatar image

Hyunsun Moon I am using a trunk port, my vlan tag is 777. It is in the range of 1-4094. How did you change the "VLAN_MIN=1 / VLAN_MAX=4094" settings?

[root@core01 nova]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 172.20.0.250 0.0.0.0 UG 0 0 0 em1.777 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 gw-4b4f2f7e-7c 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 em2 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 em1.777 172.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0 em1.777

edit flag offensive delete link more
0

answered 2012-05-22 01:35:22 -0600

hyunsun-moon gravatar image

askask,

in your '/var/log/message' log above, the actual VLAN ID assigned to your tap device is 4 I guess. "May 18 15:49:27 core01 ovs-vsctl: 00001|vsctl|INFO|Called as /usr/bin/ovs-vsctl --timeout=2 set Port tap926d429e-53 tag=4" If VLAN 4 is not defined on your physical switch, as far as I know, any packets from the tap device could be discared. Check what VLAN ID is actually assigned to your tap device using 'ovs-vsctl show', tag number is VLAN ID.

Following page might help. http://openvswitch.org/support/config-cookbooks/vlan-configuration-cookbook/ (http://openvswitch.org/support/config...)

VLAN_MIN / VLAN_MAX is hard coded in quantum/plugins/openvswitch/ovs_quantum_plugin.py So I modified the source code. When I change the values to random numbers which I haven't defined on my physical switch, VM network failed. Don't forget to restart quantum service once you change the code.

Have you tried VLAN mode first? I guess VLAN_MIN is the same value with the --vlan_start flag on your nova.conf

Hope this helps.

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

3 followers

Stats

Asked: 2012-05-18 14:45:39 -0600

Seen: 598 times

Last updated: Jun 08 '12