Mapping same bridge to different phyiscal networks succeed

Bug #1067669 reported by Alex Xu on 2012-10-17
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Medium
Robert Kukura
Folsom
Medium
Gary Kotton
quantum (Ubuntu)
Undecided
Unassigned
Quantal
Undecided
Unassigned

Bug Description

Mapping same bridge to different phyiscal networks succeed. But it looks quantum doesn't support to do that.
It should expect error when startup

with config /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini:
network_vlan_ranges = physnet1,physnet2
bridge_mappings = physnet1:br-eth0,physnet2:br-eth0

soulxu1204@soulxu1204-ThinkPad-T410:~$ quantum net-create net1 --provider:network_type flat --provider:physical_network physnet1 Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | e246914e-64bf-494a-9164-6aa29cf47945 |
| name | net1 |
| provider:network_type | flat |
| provider:physical_network | physnet1 |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | ed14419ef420480e8ace1c8ba8e9ed51 |
+---------------------------+--------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:~$ quantum net-create net2 --provider:network_type flat --provider:physical_network physnet2
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 117b2b50-98db-4fce-9389-ecf3c0dd1de9 |
| name | net2 |
| provider:network_type | flat |
| provider:physical_network | physnet2 |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | ed14419ef420480e8ace1c8ba8e9ed51 |
+---------------------------+--------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:~$ quantum subnet-create net1 11.0.0.1/24
Created a new subnet:
+------------------+--------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------+
| allocation_pools | {"start": "11.0.0.2", "end": "11.0.0.254"} |
| cidr | 11.0.0.1/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 11.0.0.1 |
| host_routes | |
| id | cf713a12-f51c-4546-8eaa-05e318539e38 |
| ip_version | 4 |
| name | |
| network_id | e246914e-64bf-494a-9164-6aa29cf47945 |
| tenant_id | ed14419ef420480e8ace1c8ba8e9ed51 |
+------------------+--------------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:~$ quantum subnet-update cf713a12-f51c-4546-8eaa-05e318539e38 --enable_dhcp False
Updated subnet: cf713a12-f51c-4546-8eaa-05e318539e38

soulxu1204@soulxu1204-ThinkPad-T410:~$ quantum subnet-create net2 12.0.0.1/24
Created a new subnet:
+------------------+--------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------+
| allocation_pools | {"start": "12.0.0.2", "end": "12.0.0.254"} |
| cidr | 12.0.0.1/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 12.0.0.1 |
| host_routes | |
| id | 4b127205-64b9-44a5-be1c-b91228a87a10 |
| ip_version | 4 |
| name | |
| network_id | 117b2b50-98db-4fce-9389-ecf3c0dd1de9 |
| tenant_id | ed14419ef420480e8ace1c8ba8e9ed51 |
+------------------+--------------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:~$ quantum subnet-update 4b127205-64b9-44a5-be1c-b91228a87a10 --enable_dhcp False
Updated subnet: 4b127205-64b9-44a5-be1c-b91228a87a10

soulxu1204@soulxu1204-ThinkPad-T410:~$ nova boot --flavor 1 --image 067cc3f8-5ab4-4546-a112-855e018cd22d --nic net-id=e246914e-64bf-494a-9164-6aa29cf47945 vm1
+-------------------------------------+----------------------------------------------------------+
| Property | Value |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | soulxu1204-ThinkPad-T410 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | soulxu1204-ThinkPad-T410 |
| OS-EXT-SRV-ATTR:instance_name | instance-0000003b |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | W7RnVXFRdK4E |
| config_drive | |
| created | 2012-10-17T09:31:07Z |
| flavor | m1.tiny |
| hostId | 3640c0ffc98edbaae3b07fb80d24c4ec9b9756c12bfaf3a476bced52 |
| id | 5bcb0aff-bfbf-4cf3-92b8-b3c385f25eb1 |
| image | ubuntu-core |
| key_name | None |
| metadata | {} |
| name | vm1 |
| progress | 0 |
| security_groups | [{u'name': u'default'}] |
| status | BUILD |
| tenant_id | ed14419ef420480e8ace1c8ba8e9ed51 |
| updated | 2012-10-17T09:31:07Z |
| user_id | d80de3ab25df48a68d7d1b754a7cfb61 |
+-------------------------------------+----------------------------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:~$ nova boot --flavor 1 --image 067cc3f8-5ab4-4546-a112-855e018cd22d --nic net-id=117b2b50-98db-4fce-9389-ecf3c0dd1de9 vm2
+-------------------------------------+----------------------------------------------------------+
| Property | Value |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | soulxu1204-ThinkPad-T410 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | soulxu1204-ThinkPad-T410 |
| OS-EXT-SRV-ATTR:instance_name | instance-0000003c |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | 3Zr3cuT4vJrc |
| config_drive | |
| created | 2012-10-17T09:31:21Z |
| flavor | m1.tiny |
| hostId | 3640c0ffc98edbaae3b07fb80d24c4ec9b9756c12bfaf3a476bced52 |
| id | 897ccfd1-8e45-4460-bd50-3b7363b58fb1 |
| image | ubuntu-core |
| key_name | None |
| metadata | {} |
| name | vm2 |
| progress | 0 |
| security_groups | [{u'name': u'default'}] |
| status | BUILD |
| tenant_id | ed14419ef420480e8ace1c8ba8e9ed51 |
| updated | 2012-10-17T09:31:21Z |
| user_id | d80de3ab25df48a68d7d1b754a7cfb61 |
+-------------------------------------+----------------------------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:~$ sudo ovs-ofctl dump-flows br-int
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=29.134s, table=0, n_packets=151, n_bytes=21886, priority=3,in_port=28,vlan_tci=0x0000 actions=mod_vlan_vid:7,NORMAL
 cookie=0x0, duration=19.137s, table=0, n_packets=0, n_bytes=0, priority=3,in_port=27,vlan_tci=0x0000 actions=mod_vlan_vid:8,NORMAL
 cookie=0x0, duration=686.233s, table=0, n_packets=1, n_bytes=90, priority=2,in_port=27 actions=drop
 cookie=0x0, duration=685.922s, table=0, n_packets=4685, n_bytes=644870, priority=2,in_port=28 actions=drop
 cookie=0x0, duration=686.475s, table=0, n_packets=78, n_bytes=10996, priority=1 actions=NORMAL

soulxu1204@soulxu1204-ThinkPad-T410:~$ sudo ovs-ofctl show br-int
OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:00009e2df557514c
n_tables:255, n_buffers:256
features: capabilities:0xc7, actions:0xfff
 28(int-br-eth0): addr:a2:60:a2:5a:11:ce
     config: 0
     state: 0
     current: 10GB-FD COPPER
 37(tap6e0a64b7-a2): addr:32:6a:5d:26:df:9d
     config: 0
     state: 0
     current: 10MB-FD COPPER
 38(tape20e75dc-b0): addr:76:3b:18:b3:88:73
     config: 0
     state: 0
     current: 10MB-FD COPPER
 LOCAL(br-int): addr:9e:2d:f5:57:51:4c
     config: PORT_DOWN
     state: LINK_DOWN
OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0

* in_port=27 doesn't exist

soulxu1204@soulxu1204-ThinkPad-T410:~$ sudo ovs-ofctl dump-flows br-eth0
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=732.787s, table=0, n_packets=64, n_bytes=10778, priority=2,in_port=10 actions=drop
 cookie=0x0, duration=66.024s, table=0, n_packets=0, n_bytes=0, priority=4,in_port=9,dl_vlan=8 actions=strip_vlan,NORMAL
 cookie=0x0, duration=76.02s, table=0, n_packets=0, n_bytes=0, priority=4,in_port=10,dl_vlan=7 actions=strip_vlan,NORMAL
 cookie=0x0, duration=733.044s, table=0, n_packets=10497, n_bytes=1541754, priority=1 actions=NORMAL

soulxu1204@soulxu1204-ThinkPad-T410:~$ sudo ovs-ofctl show br-eth0
OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:0000f0def15a0b0a
n_tables:255, n_buffers:256
features: capabilities:0xc7, actions:0xfff
 1(eth0): addr:f0:de:f1:5a:0b:0a
     config: 0
     state: 0
     current: 1GB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
     supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
 10(phy-br-eth0): addr:32:c6:d3:3d:aa:d3
     config: 0
     state: 0
     current: 10GB-FD COPPER
 LOCAL(br-eth0): addr:f0:de:f1:5a:0b:0a
     config: 0
     state: 0
OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0

* in_port=9 doesn't exist too.

dan wendlandt (danwent) wrote :

Bob, could you triage this bug? Thanks.

Changed in quantum:
assignee: nobody → Robert Kukura (rkukura)
Robert Kukura (rkukura) on 2012-10-25
Changed in quantum:
importance: Undecided → Medium
status: New → Confirmed
milestone: none → grizzly-1
Robert Kukura (rkukura) on 2012-11-13
Changed in quantum:
status: Confirmed → In Progress
dan wendlandt (danwent) on 2012-11-14
tags: added: folsom-backport-potential

Reviewed: https://review.openstack.org/16044
Committed: http://github.com/openstack/quantum/commit/90dc4691c888944d3d1691d06a739e8dc54857d6
Submitter: Jenkins
Branch: master

commit 90dc4691c888944d3d1691d06a739e8dc54857d6
Author: Bob Kukura <email address hidden>
Date: Tue Nov 13 13:50:53 2012 -0500

    Improve openvswitch and linuxbridge agents' parsing of mappings

    Created generic quantum.utils.parse_mappings function that detects
    duplicate key or value strings, and changed openvswitch and
    linuxbridge agents to use this to parse their mappings from physical
    networks to bridges or interfaces. Fixes bug 1067669.

    Also fixed some typos in comments.

    Change-Id: I342eaeeb6ff4c6e25d57d631f250faac082011b8

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-11-21
Changed in quantum:
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/16615
Committed: http://github.com/openstack/quantum/commit/eacc9d3c344d018e3d32b0352c90239e1e4c25b3
Submitter: Jenkins
Branch: stable/folsom

commit eacc9d3c344d018e3d32b0352c90239e1e4c25b3
Author: Bob Kukura <email address hidden>
Date: Tue Nov 13 13:50:53 2012 -0500

    Improve openvswitch and linuxbridge agents' parsing of mappings

    Created generic quantum.utils.parse_mappings function that detects
    duplicate key or value strings, and changed openvswitch and
    linuxbridge agents to use this to parse their mappings from physical
    networks to bridges or interfaces. Fixes bug 1067669.

    Also fixed some typos in comments.

    Change-Id: I342eaeeb6ff4c6e25d57d631f250faac082011b8

tags: added: in-stable-folsom
Gary Kotton (garyk) on 2012-11-22
tags: removed: folsom-backport-potential
Changed in quantum (Ubuntu):
status: New → Fix Released
Changed in quantum (Ubuntu Quantal):
status: New → Confirmed

Hello Alex, or anyone else affected,

Accepted quantum into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/quantum/2012.2.1-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in quantum (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Mark McLoughlin (markmc) on 2013-01-22
tags: removed: in-stable-folsom
Launchpad Janitor (janitor) wrote :
Download full text (3.8 KiB)

This bug was fixed in the package quantum - 2012.2.1-0ubuntu1

---------------
quantum (2012.2.1-0ubuntu1) quantal-proposed; urgency=low

  * Resynchronize with stable/folsom (1e774867) (LP: #1085255):
    - [aeabb42] There are routing problems when the dnsmasq port does not come
      first in the routing table (LP: #1083238)
    - [04aab72] Quantum linux bridge not optimized with libvirt (LP: #1078210)
    - [ca7fc10] getting quotas from database has severe performance implications
      (LP: #1075369)
    - [66605e8] failed to update an external network into non external network
      (LP: #1083387)
    - [c60051a] Quantum test suite leaks memory like a sieve (LP: #1065276)
    - [3179dfc] clear_db() does incomplete db teardown (LP: #1080988)
    - [c1e19d7] Unauthorized command: cat /proc/None/cmdline (LP: #1077651)
    - [af9e076] At times a instance will not receive an IP address from the DHCP
      agent (LP: #1081664)
    - [e0d1a7d] allow multiple floating-ip on single port if they use different
      fixed ips and/or external nets (LP: #1057844)
    - [8471d79] Delete port fails to gateway ip (LP: #1079980)
    - [aca8b4a] fixed_ip allocation which is not included within
      allocation_pools makes error when delete port or re-create port
      (LP: #1077292)
    - [eacc9d3] Mapping same bridge to different phyiscal networks succeed
      (LP: #1067669)
    - [51b4c82] python-quantum: not region aware (LP: #1080793)
    - [6f0a486] delete floatingip should be in one transaction to delete port
      (LP: #1080516)
    - [db6cda7] Remove qpid configuration variables no longer supported
    - [a112840] Allow NVP plugin to use per-tenant quota extension
    - [82b1a55] Quantum service does not restart after reboot (LP: #1073999)
    - [c01a839] There are some cases that L3 API with an invalid parameter
      returns 500. (LP: #1064765)
    - [26b383f] external network can be plugged also as internal network for one
      router (LP: #1053633)
    - [49f649c] There is a lot of cases that API with an invalid parameter
      returns 500. (LP: #1062046)
    - [4546a18] When create subnet, you con set up the value as cidr (the value
      isn't cidr form). (LP: #1067959)
    - [9ba453a] killfilter should handle updated/deleted executables
      (LP: #1073768)
    - [7c8a55c] a port which is not able to delete is made when floatingip
      create fails. (LP: #1064748)
    - [c9b84cf] Linux bridge port update causes exception (LP: #1072713)
    - [cb57932] I can't add interface to router, if there is another port in
      non-shared network of other tenant (LP: #1057558)
    - [574e278] Ryu plugin does not support Security Groups (LP: #1059393)
    - [607f486] tap device added to integration bridge without tag
      (LP: #1064070)
    - [21a0fdf] L3 agent external network flag (LP: #1056720)
    - [5cbaff4] router create with external_gateway_info fails with 500 always.
      (LP: #1064235)
    - [63b81f6] l3 db operations failed in multiple transactions (LP: #1070335)
    - [bff17fb] Ensure that the SqlSoup import is still supported.
    - [e091a29] l3_nat_agent was renamed to l3_agent
    - [9030969] remove default value of 'local_ip' of 10...

Read more...

Changed in quantum (Ubuntu Quantal):
status: Fix Committed → Fix Released
Eric Hankins (ehankins) wrote :

I'm not sure if this bug has affected me, but the fix seems to be affecting me, and I'm now confused about my understanding of the network_vlan_ranges and physical_interface_mappings configs.

My scenario is strictly provider network with a bunch of 802.1q VLANs riding a single bond, managed via quantum-plugin-linuxbridge-agent...for example, my working config prior to the patch that fixed this bug was:

network_vlan_ranges = DEV_WDMZ,DEV_APP,DEV_DB,DEV_ADMIN,DEV_STOR,DEV_WDMZSTOR,DEV_ADMZSTOR,DEV_FWEBDMZ,DEV_FWEBDMZSTOR,DEV_FDMZSTOR,DEV_ADMZ,DEV_FDMZ

physical_interface_mappings = DEV_WDMZ:bond0,DEV_APP:bond0,DEV_DB:bond0,DEV_ADMIN:bond0,DEV_STOR:bond0,DEV_WDMZSTOR:bond0,DEV_ADMZSTOR:bond0,DEV_FWEBDMZ:bond0,DEV_FWEBDMZSTOR:bond0,DEV_FDMZSTOR:bond0,DEV_ADMZ:bond0,DEV_FDMZ:bond0

After this patch, the agent fails on startup citing what would seem to be my duplicate usage of bond0:

2013-03-06 17:46:33 ERROR [quantum.plugins.linuxbridge.agent.linuxbridge_quantum_agent] Parsing physical_interface_mappings failed: Value bond0 in mapping: 'DEV_APP:bond0' not unique. Agent terminated!

It seems that a duplication of the interface value should be a nonissue? This worked fine previously, so if someone can explain how my linuxbridge config should look for multiple network attachment to the same interface I'd appreciate it.

Robert Kukura (rkukura) wrote :

Eric,

It sounds like your DEV_WDMZ ... DEV_FDMZ are all VLANs on the same physical network.

If so, you should just set something like "network_vlan_ranges = DEV_TRUNK" on the quantum server, and "physical_interface_mappings = DEV_TRUNK:bond0" on the compute and network nodes.

The linuxbridge server and agent configuration only need to know about the physical network(s), not the individual provider VLANs you are allocating on the physical network.

If you are using multiple physical networks (multiple distinct VLAN trunks), then each physical network needs to be listed, as in "network_vlan_ranges = TRUNK1,TRUNK2" and "physical_interface_mappings = TRUNK1:bond0,TRUNK2:bond1". In this case VLAN X on TRUNK1 is a different isolated L2 network than VLAN X on TRUNK2.

-Bob

Eric Hankins (ehankins) wrote :

Thanks for the information Bob, much appreciated.

I had it in my head that the network name i was specifying in my quantum net-create command needed to map all the way down to the physical_interface_mappings keys.

Now that I think about it, the --provider:physical_network <phys-net-name> is the key of reference, so my quantum net-create should look like:

quantum net-create DEV_WDMZ --provider:network_type vlan --provider:physical_network DEV_TRUNK --provider:segmentation_id 1004

Thanks again for setting me straight!

Thierry Carrez (ttx) on 2013-04-04
Changed in quantum:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers