ovs: port not associated with the right bridge

Asked by Pete Fritchman

I'm attempting to use Quantum with the OVS plugin to hook up some instances to existing physical networks. On my nova-compute host, eth1 is the physical network I want to bridge things onto.

In ovs_quantum_plugin.ini, I have:
network_vlan_ranges=eth1
bridge_mappings=eth1:br-site

In nova.conf, I have:
libvirt_use_virtio_for_bridges=True
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver

I have created a br-site and added eth1 to it:
compute# ovs-vsctl list-ifaces br-site
eth1
phy-br-site

On the controller, I have defined a provider network backed by the "eth1" physical network:
controller# quantum net-show f2946abb-d5c6-4926-94c2-39ece4e6820f
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | f2946abb-d5c6-4926-94c2-39ece4e6820f |
| name | site-net |
| provider:network_type | flat |
| provider:physical_network | eth1 |
| provider:segmentation_id | |
| router:external | True |
| shared | True |
| status | ACTIVE |
| subnets | f921585c-3af9-4331-a943-119f9e5a9960 |
| tenant_id | 3138a2b60ce54a3eab33f1cbdec5b3e8 |
+---------------------------+--------------------------------------+

and associated a subnet:
controller# quantum subnet-show f921585c-3af9-4331-a943-119f9e5a9960
+------------------+----------------------------------------------------+
| Field | Value |
+------------------+----------------------------------------------------+
| allocation_pools | {"start": "10.238.158.66", "end": "10.238.158.94"} |
| cidr | 10.238.158.64/27 |
| dns_nameservers | |
| enable_dhcp | False |
| gateway_ip | 10.238.158.65 |
| host_routes | |
| id | f921585c-3af9-4331-a943-119f9e5a9960 |
| ip_version | 4 |
| name | isa-site |
| network_id | f2946abb-d5c6-4926-94c2-39ece4e6820f |
| tenant_id | 3138a2b60ce54a3eab33f1cbdec5b3e8 |
+------------------+----------------------------------------------------+

This is how I'm launching the instance:
controller# quantum port-create --fixed-ip subnet_id=f921585c-3af9-4331-a943-119f9e5a9960,ip_address=10.238.158.85 site-net
Created a new port:
[...]
| fixed_ips | {"subnet_id": "f921585c-3af9-4331-a943-119f9e5a9960", "ip_address": "10.238.158.85"} |
| network_id | f2946abb-d5c6-4926-94c2-39ece4e6820f

controller# nova boot --image 0c413854-e943-458d-8796-7b7dbb3fe581 --flavor m1.tiny --nic port-id=992402d9-e354-45f1-bcb3-d20b17a06439 petef3

Now when I go look on the compute node, I see the bridge hooked up to br-int:
compute# ovs-vsctl list-ports br-int
int-br-site
qvo992402d9-e3
tap375395d4-6f
compute# ovs-vsctl list-ports br-site
eth1
phy-br-site

But they never get hooked up to br-site, hence never get bridged to eth1, and don't end up on the network. Any ideas? Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
yong sheng gong
Solved:
Last query:
Last reply:
Revision history for this message
Alex Xu (xuhj) said :
#1

port associated by flow table, you can try 'ovs-ofctl dump-flows br-site' and 'ovs-ofctl dump-flows br-int'

Revision history for this message
Best yong sheng gong (gongysh) said :
#2

veth peer int-br-site and phy-br-site connects br-int an br-site.
veth qvo992402d9-e3 and qvb992402d9-e3 connects br-int and another linux bridge, on which
vnetx is your VM's tap device.

Revision history for this message
Pete Fritchman (petef) said :
#3

compute# ovs-ofctl dump-flows br-site
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=74218.267s, table=0, n_packets=28, n_bytes=2128, priority=2,in_port=3 actions=drop
 cookie=0x0, duration=59629.791s, table=0, n_packets=6, n_bytes=476, priority=4,in_port=3,dl_vlan=10 actions=strip_vlan,NORMAL
 cookie=0x0, duration=74218.966s, table=0, n_packets=0, n_bytes=0, priority=1 actions=NORMAL
compute# ovs-ofctl dump-flows br-int
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=59637.709s, table=0, n_packets=0, n_bytes=0, priority=3,in_port=3,vlan_tci=0x0000 actions=mod_vlan_vid:10,NORMAL
 cookie=0x0, duration=74226.312s, table=0, n_packets=2, n_bytes=168, priority=2,in_port=3 actions=drop
 cookie=0x0, duration=74227.078s, table=0, n_packets=95, n_bytes=10194, priority=1 actions=NORMAL

I never see any traffic on eth1, though: `tcpdump -n -i eth1` doesn't show any packets when the host is trying to DHCP.

Revision history for this message
Pete Fritchman (petef) said :
#4

Ah, I should have run tcpdump on the bridge interface, it seems. Anyway, I ended up switching to the linuxbridge plugin because I don't need the complexity of ovs, and figured the interface tcpdump thing out there.

Revision history for this message
Pete Fritchman (petef) said :
#5

Thanks yong sheng gong, that solved my question.