Ask Your Question
0

Something wrong with the flow tables after openvswitch initialized??

asked 2014-01-10 06:40:19 -0500

spring1201 gravatar image

Hi list,

My environment is Ubuntu12.04.3 + Havana with three nodes:

server node: neutron-server

network node: neutron-openvswitch-agent and neutron-dhcp-agent

compute node: neutron-openvswitch-agent

I can create a VM and network sucessfully but the vm can't get ip.

compute node:

root@havana-cn:~# ovs-vsctl show d4599681-a60f-441b-b0ab-ba56c177f883 Bridge "br1" Port "br1" Interface "br1" type: internal Bridge br-int Port "tap45b4b1af-27" tag: 1 Interface "tap45b4b1af-27" Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Bridge br-tun Port br-tun Interface br-tun type: internal Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Port "gre-1" Interface "gre-1" type: gre options: {in_key=flow, local_ip="192.168.2.2", out_key=flow, remote_ip="192.168.2.1"} ovs_version: "1.10.2"

root@havana-cn:~# ovs-ofctl show br-tun
OFPT_FEATURES_REPLY (xid=0x2): dpid:00006e57dff75746 n_tables:254, n_buffers:256 capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE 1(patch-int): addr:aa:33:a0:be:e1:f7 config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max 2(gre-1): addr:52:75:cf:71:c1:06 config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max LOCAL(br-tun): addr:6e:57:df:f7:57:46 config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

network node:

root@havana-net:~# ovs-vsctl show
be6364ba-b079-44b2-ae73-2f9e4299593c Bridge br-int Port "tap89dbfa13-8f" tag: 1 Interface "tap89dbfa13-8f" type: internal Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port br-int Interface br-int type: internal Bridge br-tun Port br-tun Interface br-tun type: internal Port "gre-2" Interface "gre-2" type: gre options: {in_key=flow, local_ip="192.168.2.1", out_key=flow, remote_ip="192.168.2.2"} Port patch-int Interface patch-int type: patch options: {peer=patch-tun} ovs_version: "1.10.2"

root@havana-net:~# ovs-ofctl show br-tun
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000568a33b17b42 n_tables:254, n_buffers:256 capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE 1(patch-int): addr:9a:b7:0b:e8:64:e4 config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max 2(gre-2): addr:32:e8:9a:04:7c:1b config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max LOCAL(br-tun): addr:56:8a:33:b1:7b:42 config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

When i run udhcpc, i can't get the data packages from network node. and can't even get data packages from the br-tun in compute node.(tcpdump -i br-tun) Here is the dump-flows in compute node.

root@havana-cn:~# ovs-ofctl dump-flows br-tun NXST_FLOW reply (xid=0x4): cookie=0x0, duration=44.008s, table=0, n_packets=0, n_bytes=0, idle_age=44, priority=1,in_port=1 actions=resubmit(,1) cookie=0x0, duration=43.217s, table=0, n_packets=0, n_bytes=0, idle_age=43, priority=1,in_port=2 actions=resubmit(,2) cookie=0x0, duration=43.961s, table=0, n_packets=5, n_bytes=378, idle_age=34, priority=0 actions=drop cookie=0x0, duration=43.876s ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2014-01-17 08:39:16 -0500

spring1201 gravatar image

i found out the reason at last. It's caused by missing "tenant_network_type = gre" in controller ovs plugin config file. So the neutron server send the network information with default tenant_network_type = local. in the compute node, the plugin agent will not create more flows. In the provision_local_vlan(self, net_uuid, network_type, physical_network, segmentation_id) method will not add the flow.

def provision_local_vlan(self, net_uuid, network_type, physical_network, segmentation_id): .... elif network_type == constants.TYPE_LOCAL: # no flows needed for local networks pass else: LOG.error(_("Cannot provision unknown network type " "%(network_type)s for net-id=%(net_uuid)s"), {'network_type': network_type, 'net_uuid': net_uuid})

edit flag offensive delete link more
0

answered 2014-01-13 07:14:00 -0500

gongysh gravatar image

it seems the flow rules on br-tun bridge are missing some. In table 21, we should have more besides: cookie=0x0, duration=43.648s, table=21, n_packets=0, n_bytes=0, idle_age=43, priority=0 actions=drop

what is your configuration when your start the OpenView agent? I mean enable the debug=True, and paste the configurations here.

edit flag offensive delete link more

Comments

i have the same flow table tenant_network_type = gre tunnel_id_ranges = 1:1000 enable_tunneling = True integration_bridge = br-int tunnel_bridge = br-tun local_ip = 172.16.0.201 remote_ip = 172.16.0.204 what is something wrong in the flow

alvi2 gravatar imagealvi2 ( 2014-03-18 15:22:24 -0500 )edit

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: 2014-01-10 06:40:19 -0500

Seen: 582 times

Last updated: Jan 17 '14