Cisco Nexus: maximum recursion error in ConnectionContext.__del__

Bug #1286565 reported by Dane LeBlanc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Dane LeBlanc

Bug Description

If DevStack is configured for the Cisco Nexus plugin with the latest DevStack, the following
infinite recursion error is observed:
Exception RuntimeError: 'maximum recursion depth exceeded' in <bound method
ConnectionContext.__del__ of <neutron.openstack.common.rpc.amqp.ConnectionContext
object at 0x403a3d0>> ignored

An investigation shows that this failure triggered when the DB base plugin's
_is_native_pagination_supported method is called. The infinite recursion begins
when this exception is raised:

             raise AttributeError(
                 _("'%(model)s' object has no attribute '%(name)s'") %
                {'model': self._model, 'name': name})

in the PluginV2.__getattr__ method in
neutron/plugins/cisco/network_plugin.py. The problem is that self._model
object is being % mod'd as a string in the unicode message, and this
causes many levels of recursion into deepcopy (a deepcopy for all objects
embedded in this object).

Tags: cisco
Dane LeBlanc (leblancd)
Changed in neutron:
assignee: nobody → Dane LeBlanc (leblancd)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/80737

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
milestone: none → icehouse-rc1
Dane LeBlanc (leblancd)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/80737
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c36ddaf930ba309be3c127dc1836f28a8ab97c5d
Submitter: Jenkins
Branch: master

commit c36ddaf930ba309be3c127dc1836f28a8ab97c5d
Author: Dane LeBlanc <email address hidden>
Date: Fri Mar 14 20:32:10 2014 -0400

    Cisco Nexus: maximum recursion error in ConnectionContext.__del__

    If DevStack is configured for the Cisco Nexus plugin, the following
    error is observed:

    Exception RuntimeError: 'maximum recursion depth exceeded' in <bound
    method ConnectionContext.__del__ of
    <neutron.openstack.common.rpc.amqp.ConnectionContext object at
    0x403a3d0>> ignored

    The root cause of the problem is that the Cisco Nexus plugin's
    PluginV2.__gettattr__ method, a model object is being passed
    as a value for a unicode %s format mod. Because the neutron server
    has "lazy gettext" (deferred interpretation of unicode objects) enabled,
    this causes many layers of recursive calls to deepcopy.

    The fix is to pass a string object for the unicode %s mod field.

    Change-Id: I0a07a0ab417add68e44cb1bca722cb0b4a71205b
    Closes-Bug: #1286565

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-rc1 → 2014.1
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.