Ask Your Question
0

Quantum with Openvswitch and stack.sh no gateway interface

asked 2012-08-23 13:52:17 -0500

eoghank gravatar image

I am trying to run an all-in-one using stack.sh with the latest (folsom3 and master) branches of Quantum on KVM but the gateway interface does not get created and as a result VM's do not get an IP. I've updated the install to include the steps mentioned here http://wiki.openstack.org/RunningQuantumV2Api (http://wiki.openstack.org/RunningQuan...) and here http://wiki.openstack.org/QuantumDevstack (http://wiki.openstack.org/QuantumDevs...) but never get a gateway interface after creating a network and subnet and spinning up a VM.

This is what ovs-vsctl displays (after creating a network and subnet and spinning up a VM: stack@esg-dell-c4-s11:~/devstack$ sudo ovs-vsctl show 5dab4e1c-89c4-421e-a737-03b338eddc1a Bridge br-int Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port "tap73f2ee73-79" tag: 1 Interface "tap73f2ee73-79" type: internal Port "tapd425d955-15" tag: 2 Interface "tapd425d955-15" type: internal Port br-int Interface br-int type: internal Port "tapc46b72b3-b3" tag: 2 Interface "tapc46b72b3-b3" Bridge br-tun Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal ovs_version: "1.4.0+build0"

Are there any additional steps that need to be run to make this work with the V2 Quantum API?

Eoghan

edit retag flag offensive close merge delete

30 answers

Sort by ยป oldest newest most voted
0

answered 2012-08-24 12:46:44 -0500

eoghank gravatar image

Thanks Aaron Rosen, that solved my question.

edit flag offensive delete link more
0

answered 2012-08-24 12:46:27 -0500

eoghank gravatar image

Thanks Aaron and Dan,

I thought that may be the case (gateway and IP's being inaccessible from the hyperverisor) but was not sure. And I can see the VM getting an IP in the nova console-log output so quantum dhcp is working.

edit flag offensive delete link more
0

answered 2012-08-24 05:29:33 -0500

danwent gravatar image

There's some confusion here:

1) unlike nova-network, quantum DHCP does not use the gateway IP address of the subnet. Thus, the lack of a tap device with the gateway IP does not mean that the DHCP server is not running. In fact, by default, quantum runs DHCP in its own isolated network namespace, so you would not see the IP address of the DHCP server from the main test host.

2) The actual gateway is implemented using the quantum-l3-agent, which just landed after F-3. Devstack support for this is still under review (should merge within a few days). The quantum-l3-agent uses namespaces as well though, so by default, you wouldn't see the .1 IP address using ifconfig even using L3 is in use.

edit flag offensive delete link more
0

answered 2012-08-23 14:23:40 -0500

hi eoghan

i'm not sure why vm's in your setup are not getting an ip but based on my experience so far, one of the "tap" ports in your setup should be gateway interface. that tap port gets created when you have created a subnet for that network and it get's the gateway ip assigned to it. so if you do ifconfig, that tap port should have an ip assigned. if that's not the case then the best place to look for errors is in /opt/stack/logs/screen/screen-q-*.log

thanks rohit

edit flag offensive delete link more
0

answered 2012-08-23 15:51:14 -0500

eoghank gravatar image

Rohit

I looked at all the quantum logs and could not find any errors and none of the tap interfaces get IP addresses assigned. I ran the folsom2 version of Quantum on this same server and it worked fine and created tap and gateway devices (and the gateway was assigned an IP). This is what the tap interface looks like after creating a network and subnet.

tap9618cae3-7e Link encap:Ethernet HWaddr 36:13:13:d4:71:b5 inet6 addr: fe80::3413:13ff:fed4:71b5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:153 errors:0 dropped:0 overruns:0 frame:0 TX packets:60 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:11664 (11.6 KB) TX bytes:7982 (7.9 KB)

Is there anything else I can look at?

Thanks Eoghan

edit flag offensive delete link more
0

answered 2012-08-23 16:04:08 -0500

Do you have q-dhcp in ENABLED_SERVICES? I don't see a port for the dhcp agent attached to your bridge.

edit flag offensive delete link more
0

answered 2012-08-23 17:43:39 -0500

eoghank gravatar image

I have q-dhcp enabled and it is running.

edit flag offensive delete link more
0

answered 2012-08-23 20:57:48 -0500

eoghank gravatar image

Looked back at the logs and think maybe this is what causes the problems (I am running Ubuntu 12.04).

2012-08-23 13:40:30 DEBUG [quantum.agent.linux.dhcp] Unable to access /opt/stack/data/dhcp/910bebe6-13a3-438c-a021-a217269d43b4/pid 2012-08-23 13:40:30 DEBUG [quantum.agent.linux.utils] Running command: sudo cat /proc/None/cmdline 2012-08-23 13:40:30 DEBUG [quantum.agent.linux.utils] Command: ['sudo', 'cat', '/proc/None/cmdline'] Exit code: 1 Stdout: '' Stderr: 'cat: /proc/None/cmdline: No such file or directory\n' ............................. 2012-08-23 13:40:30 DEBUG [quantum.agent.linux.utils] Running command: sudo ip netns exec 910bebe6-13a3-438c-a021-a217269d43b4 ip -o link show tape9e2be92-ca 2012-08-23 13:40:30 DEBUG [quantum.agent.linux.utils] Command: ['sudo', 'ip', 'netns', 'exec', '910bebe6-13a3-438c-a021-a217269d43b4', 'ip', '-o', 'link', 'show', 'tape9e2be92-ca'] Exit code: 1 Stdout: '' Stderr: 'Cannot open network namespace: No such file or directory\n'

edit flag offensive delete link more
0

answered 2012-08-23 23:08:01 -0500

Hi Eoghan,

I think that error you see there is fine. I believe the agent does a show to see if the interface exists and if it doesn't it goes ahead and creates the interface. I just ran stack.sh with the following:

ENABLED_SERVICES="g-api,g-reg,key,n-api,n-cpu,n-sch,n-vnc,mysql,rabbit,openstackx,q-svc,quantum,q-agt,n-cpu,q-dhcp" Q_PLUGIN=openvswitch

and everything worked fine. Can you try rm -fr /opt/stack; and then do a git pull in your devstack dir to make sure that you have the most up to date devstack code?

edit flag offensive delete link more
0

answered 2012-08-24 00:30:34 -0500

eoghank gravatar image

Hi Aaron

I did a git pull and tried with this in my stackrc: ENABLED_SERVICES="g-api,g-reg,key,n-api,n-cpu,n-sch,n-vnc,mysql,rabbit,openstackx,q-svc,quantum,q-agt,n-cpu,q-dhcp" Q_PLUGIN=openvswitch

I created a network and subnet: quantum net-create private quantum subnet-create b7076534-e1b5-42fc-ac4b-14196fb9f21d 10.0.1.0/24

Then booted up the VM with this: nova boot --image facb609d-5399-4023-808a-bf10fb39e47c --flavor 1 --nic net-id=b7076534-e1b5-42fc-ac4b-14196fb9f21d test

From the console log it looks like the VM got an IP but I still cannot ping it:

ci-info: lo : 1 127.0.0.1 255.0.0.0 ci-info: eth0 : 1 10.0.1.3 255.255.255.0 fa:16:3e:d3:f2:f1 ci-info: route-0: 0.0.0.0 10.0.1.1 0.0.0.0 eth0 UG ci-info: route-1: 10.0.1.0 0.0.0.0 255.255.255.0 eth0 U cloud-init start running: Fri, 24 Aug 2012 00:22:41 +0000. up 6.52 seconds 2012-08-24 00:22:44,681 - DataSourceEc2.py[WARNING]: 'http://169.254.169.254' failed: url error [timed out]

And I still do not see the any gateways. Ifconfig still only shows the tap devices:

tap17199918-5d Link encap:Ethernet HWaddr de:c9:18:64:8a:aa inet6 addr: fe80::dcc9:18ff:fe64:8aaa/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:77 errors:0 dropped:0 overruns:0 frame:0 TX packets:35 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:5346 (5.3 KB) TX bytes:3626 (3.6 KB)

tap455c4a70-f3 Link encap:Ethernet HWaddr a6:f9:4c:e4:f2:cc inet6 addr: fe80::a4f9:4cff:fee4:f2cc/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:1836 (1.8 KB) TX bytes:468 (468.0 B)

And ovs-vsctl still shows this:

8d3731cf-1ac2-4df8-86e5-47ed0a5106ac Bridge br-int Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port "tapc0474b52-85" tag: 2 Interface "tapc0474b52-85" type: internal Port br-int Interface br-int type: internal Port "tap196eecae-49" tag: 2 Interface "tap196eecae-49" Port "tap647b6989-d5" tag: 1 Interface "tap647b6989-d5" type: internal Bridge br-tun Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port br-tun Interface br-tun type: internal ovs_version: "1.4.0+build0"

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: 2012-08-23 13:52:17 -0500

Seen: 25,538 times

Last updated: Aug 30 '12