Neutron/Nexus switch: traceback is logged endlessly when the “vlan_name_prefix” is set with > 32 characters

Bug #1407791 reported by Danny Choi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-cisco
Fix Committed
Undecided
Robert Pothier

Bug Description

The max size for the VLAN name on the Nexus switch is 32 characters.

I defined the variable “vlan_name_prefix” with 36 characters as abcdefghijklmnopqrstuvwxyz0123456789.

When creating the VLAN, it fails to configure the name due to the illegal size name prefix.

It keeps attempting to configure the VLAN name repeatedly and logged the traceback. It never move on to the interface switch port trunk configuration.

It did not stop until the VM is deleted.

Snippet of the screen-q-svc.log:

2014-12-28 20:14:21.283 DEBUG neutron.plugins.ml2.drivers.cisco.nexus.mech_cisco_nexus [req-fc7726c7-bc6a-4226-94ed-26d83997ef9e None None] Nexus: create & trunk vlan %s from (pid=2710) _configure_switch_entry /opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py:214
2014-12-28 20:14:21.283 DEBUG neutron.plugins.ml2.drivers.cisco.nexus.nexus_network_driver [req-fc7726c7-bc6a-4226-94ed-26d83997ef9e None None] NexusDriver:
      <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
        <configure>
          <__XML__MODE__exec_configure>
            <vlan>
              <vlan-id-create-delete>
                <__XML__PARAM_value>300</__XML__PARAM_value>
                <__XML__MODE_vlan>
                  <name>
                    <vlan-name>abcdefghijklmnopqrstuvwxyz0123456789300</vlan-name>
                  </name>
                </__XML__MODE_vlan>
              </vlan-id-create-delete>
            </vlan>

          </__XML__MODE__exec_configure>
        </configure>
      </config>
 from (pid=2710) create_vlan /opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/nexus_network_driver.py:197
2014-12-28 20:14:21.749 DEBUG neutron.plugins.ml2.drivers.cisco.nexus.nexus_network_driver [req-fc7726c7-bc6a-4226-94ed-26d83997ef9e None None] NexusDriver config:
      <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
        <configure>
          <__XML__MODE__exec_configure>
            <vlan>
              <vlan-id-create-delete>
                <__XML__PARAM_value>300</__XML__PARAM_value>
                <__XML__MODE_vlan>
                  <name>
                    <vlan-name>abcdefghijklmnopqrstuvwxyz0123456789300</vlan-name>
                  </name>
                </__XML__MODE_vlan>
              </vlan-id-create-delete>
            </vlan>

          </__XML__MODE__exec_configure>
        </configure>
      </config>
 from (pid=2710) _edit_config /opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/nexus_network_driver.py:96
2014-12-28 20:14:22.092 ERROR neutron.plugins.ml2.managers [req-fc7726c7-bc6a-4226-94ed-26d83997ef9e None None] Mechanism driver 'cisco_nexus' failed in update_port_postcommit
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers Traceback (most recent call last):
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 299, in _call_on_drivers
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context)
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers File "/opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py", line 380, in update_port_postcommit
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers self._configure_switch_entry, vni)
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers File "/opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py", line 310, in _port_action_vlan
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers func(vlan_id, device_id, host_id, vni, is_provider_vlan)
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers File "/opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py", line 217, in _configure_switch_entry
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers vni)
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers File "/opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/nexus_network_driver.py", line 283, in create_and_trunk_vlan
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers self.create_vlan(nexus_host, vlan_id, vlan_name, vni)
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers File "/opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/nexus_network_driver.py", line 200, in create_vlan
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers allowed_exc_strs=["VLAN with the same name exists"])
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers File "/opt/stack/neutron/neutron/plugins/ml2/drivers/cisco/nexus/nexus_network_driver.py", line 111, in _edit_config
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers raise cexc.NexusConfigFailed(config=config, exc=e)
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers NexusConfigFailed: Failed to configure Nexus:
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <configure>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <__XML__MODE__exec_configure>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <vlan>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <vlan-id-create-delete>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <__XML__PARAM_value>300</__XML__PARAM_value>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <__XML__MODE_vlan>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <name>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers <vlan-name>abcdefghijklmnopqrstuvwxyz0123456789300</vlan-name>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers </name>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers </__XML__MODE_vlan>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers </vlan-id-create-delete>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers </vlan>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers </__XML__MODE__exec_configure>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers </configure>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers </config>
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers . Reason: Syntax error while parsing 'name abcdefghijklmnopqrstuvwxyz0123456789300'
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers .
2014-12-28 20:14:22.092 TRACE neutron.plugins.ml2.managers
2014-12-28 20:14:22.096 ERROR oslo.messaging.rpc.dispatcher [req-fc7726c7-bc6a-4226-94ed-26d83997ef9e None None] Exception during message handling: update_port_postcommit failed.
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/neutron/neutron/plugins/ml2/rpc.py", line 161, in update_device_up
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher host)
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/neutron/neutron/plugins/ml2/plugin.py", line 1196, in update_port_status
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher self.mechanism_manager.update_port_postcommit(mech_context)
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 535, in update_port_postcommit
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher continue_on_failure=True)
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 310, in _call_on_drivers
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher method=method_name
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher MechanismDriverError: update_port_postcommit failed.
2014-12-28 20:14:22.096 TRACE oslo.messaging.rpc.dispatcher
2014-12-28 20:14:22.097 ERROR oslo.messaging._drivers.common [req-fc7726c7-bc6a-4226-94ed-26d83997ef9e None None] Returning exception update_port_postcommit failed. to caller
2014-12-28 20:14:22.098 ERROR oslo.messaging._drivers.common [req-fc7726c7-bc6a-4226-94ed-26d83997ef9e None None] ['Traceback (most recent call last):\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/opt/stack/neutron/neutron/plugins/ml2/rpc.py", line 161, in update_device_up\n host)\n', ' File "/opt/stack/neutron/neutron/plugins/ml2/plugin.py", line 1196, in update_port_status\n self.mechanism_manager.update_port_postcommit(mech_context)\n', ' File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 535, in update_port_postcommit\n continue_on_failure=True)\n', ' File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 310, in _call_on_drivers\n method=method_name\n', 'MechanismDriverError: update_port_postcommit failed.\n']

Tags: nexus
Danny Choi (dannchoi)
tags: added: cisco
Revision history for this message
Robert Pothier (rpothier) wrote :

Code review
https://review.gerrithub.io/#/c/14665/

Merged into staging/junoplus

affects: python-neutronclient → networking-cisco
Changed in networking-cisco:
assignee: nobody → Robert Pothier (rpothier)
Changed in networking-cisco:
status: New → Fix Committed
Henry Gessau (gessau)
tags: added: nexus
tags: removed: cisco
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.