NVP plugin extension lswitch created with wrong transport zone binding

Bug #1352932 reported by Han Zhou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vmware-nsx
New
Undecided
Unassigned

Bug Description

Nicira NVP plugin create extension lswitches when port number on a bridged (flat) network reaches upper limit (configured by max_lp_per_bridged_ls in nvp.ini).

However, in Havana version, when extension lswitches are created for "flat" networks, it use wrong transport zone binding.

Expected: use same transport zone binding as specified by the network.

Result: use default transport zone binding configured by default_tz_uuid and default_transport_type in nvp.ini.

This bug is introduced in Havana version.

Root cause:
in Havana, tz_uuid was generated in a new function _convert_to_nvp_transport_zones(), and it checks if mpnet.SEGMENTS is not set for the network, the default tz_uuid and transport type are used:
        if (network and not attr.is_attr_set(
            network.get(mpnet.SEGMENTS))):
            return [{"zone_uuid": cluster.default_tz_uuid,
                     "transport_type": cfg.CONF.NVP.default_transport_type}]

For a bridged network without VLAN, this mpnet.SEGMENTS is not set. So the function returns with the default binding rather than use the tz binding of the specified network.

Han Zhou (zhouhan)
tags: added: nicira
Aaron Rosen (arosen)
Changed in neutron:
assignee: nobody → Aaron Rosen (arosen)
importance: Undecided → High
tags: added: havana-backport-potential
Revision history for this message
Aaron Rosen (arosen) wrote :

Fixed in master/juno already by https://review.openstack.org/#/c/106067/ will backport.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/113326

Revision history for this message
Aaron Rosen (arosen) wrote :

Err sorry I see this is actually talking about a different issue around bridged logical chaining.

Revision history for this message
Aaron Rosen (arosen) wrote :
Download full text (6.4 KiB)

2014-08-11 11:54:20.979 ERROR neutron.plugins.vmware.api_client.client [req-2e1404a4-52dd-4348-bd3e-1bf863c6066b admin c76d95a547294fa3a377f2039136305c] Received error code: 400
2014-08-11 11:54:20.980 ERROR neutron.plugins.vmware.api_client.client [req-2e1404a4-52dd-4348-bd3e-1bf863c6066b admin c76d95a547294fa3a377f2039136305c] Server Error Message: LogicalForwardingElementConfig.tags: must contain at most 5 items (value is [{'scope': 'os_tid', 'tag': 'c76d95a547294fa3a377f2039136305c'}, {'scope': 'quantum', 'tag': '2014.2.dev196.g18a10fa'}, {'scope': 'quantum', 'tag': '2014.2.dev196.g18a10fa'}, {'scope': 'quantum_net_id', 'tag': '788e5b7c-4cff-4440-b2ea-3519b34229e7'}, {'scope': 'os_tid', 'tag': 'c76d95a547294fa3a377f2039136305c'}, {'scope': 'multi_lswitch', 'tag': 'True'}])
2014-08-11 11:54:20.980 ERROR NeutronPlugin [req-2e1404a4-52dd-4348-bd3e-1bf863c6066b admin c76d95a547294fa3a377f2039136305c] An exception occurred while selecting logical switch for the port
2014-08-11 11:54:20.980 TRACE NeutronPlugin Traceback (most recent call last):
2014-08-11 11:54:20.980 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/plugins/base.py", line 387, in _nsx_find_lswitch_for_port
2014-08-11 11:54:20.980 TRACE NeutronPlugin max_ports, allow_extra_lswitches)
2014-08-11 11:54:20.980 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/plugins/base.py", line 865, in _handle_lswitch_selection
2014-08-11 11:54:20.980 TRACE NeutronPlugin tags=tags)
2014-08-11 11:54:20.980 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/nsxlib/switch.py", line 148, in update_lswitch
2014-08-11 11:54:20.980 TRACE NeutronPlugin cluster=cluster)
2014-08-11 11:54:20.980 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/nsxlib/__init__.py", line 98, in do_request
2014-08-11 11:54:20.980 TRACE NeutronPlugin res = cluster.api_client.request(*args)
2014-08-11 11:54:20.980 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/api_client/client.py", line 115, in request
2014-08-11 11:54:20.980 TRACE NeutronPlugin exception.ERROR_MAPPINGS[status](response)
2014-08-11 11:54:20.980 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/api_client/exception.py", line 83, in fourZeroZero
2014-08-11 11:54:20.980 TRACE NeutronPlugin raise BadRequest()
2014-08-11 11:54:20.980 TRACE NeutronPlugin BadRequest: The server is unable to fulfill the request due to a bad syntax
2014-08-11 11:54:20.980 TRACE NeutronPlugin
2014-08-11 11:54:20.984 ERROR NeutronPlugin [req-2e1404a4-52dd-4348-bd3e-1bf863c6066b admin c76d95a547294fa3a377f2039136305c] An exception occurred while creating the neutron port 35342ff8-cc4c-46b0-af26-7e2eea1e4d7d on the NSX plaform
2014-08-11 11:54:20.984 TRACE NeutronPlugin Traceback (most recent call last):
2014-08-11 11:54:20.984 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/plugins/base.py", line 450, in _nsx_create_port
2014-08-11 11:54:20.984 TRACE NeutronPlugin port_data)
2014-08-11 11:54:20.984 TRACE NeutronPlugin File "/opt/stack/neutron/neutron/plugins/vmware/plugins/base.py", line 392, in _nsx_find_lswitch...

Read more...

Revision history for this message
Han Zhou (zhouhan) wrote :

Yes, this is about bridged extension lswitch. Could it be fixed by not calling _convert_to_nvp_transport_zones() when creating the extension lswitch, but just using the zone binding information from the existing network?

Aaron Rosen (arosen)
Changed in neutron:
importance: High → Undecided
Revision history for this message
Aaron Rosen (arosen) wrote :

Hi Han,

yup, in nvp 4.0+ the api now does not allow you to create multiple lswitches on the same transport zone and vlan. The reason for this is because of the improved scale of nvp with bridged logicals. For now the work around is to just increase max_lp_per_bridged_ls to a huge number. We'll remove the logic in neutron that is doing this lswitch chaining.

Revision history for this message
Han Zhou (zhouhan) wrote :

Hi Aaron,

Make sense, please consider bug #1352925 together, which would also be resolved by removing the lswitch chaining logic.
However, please be careful about backward compatibility when removing the logic: someone could use e.g. Havana + NVP3.x.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/icehouse)

Change abandoned by Aaron Rosen (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/113326

tags: added: vmware
Changed in neutron:
importance: Undecided → Low
no longer affects: neutron
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.