port binding registration with NeutronDbPluin causes Neutron Crash

Bug #1226169 reported by Sukhdev Kapur
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Sukhdev Kapur

Bug Description

When Arista Mechanism driver tries to read all ports from NetutronDbPlugin, it causes Neutron server to crash and prevents neutron from starting. Depending upon when the ports DB is read, the nature of crash can be severe. If read during initialization, the neutron service will not start. If the same DB is read while neutron is up and running, then an exception is raised and the read is failed.

This issue will hit any plugin or driver which reads the ports information from Neutron DB.
This is a very re-produceable bug.

Please see the trace log at the pasted link below.

http://paste.openstack.org/show/47115/

I have verified the issue and have a fix and verified it as well. This problem is with the way port binding registers the '_extend_port_dict_binding'. It is registered as a function as opposed to function pointer. Therefore when the NeutronDbPluginv2 invokes this function, it ends up with wrong context - and hence the problem.

The fix is attached with this bug.
I Will be submitting a patch shortly for the review.

-Sukhdev

Revision history for this message
Sukhdev Kapur (sukhdev-8) wrote :
Changed in neutron:
assignee: nobody → Sukhdev Kapur (sukhdev-8)
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/46796

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/46796
Committed: http://github.com/openstack/neutron/commit/9b18a8035f2e804040f5d0778c83cf72b06b6c41
Submitter: Jenkins
Branch: master

commit 9b18a8035f2e804040f5d0778c83cf72b06b6c41
Author: sukhdev <email address hidden>
Date: Mon Sep 16 12:00:13 2013 -0700

    Port binding registration with NeutronDbPlugin causes Neutron crash

    fixes bug: 1226169

    port binding feature of ML2 plugin registers a callback function with
    db_base_plugin_v2.NeutronDbPluginV2, which is invoked during a query of
    port DB. This function is registered by name instead by refefence. This
    causes wrong context to be passed to the function upon invocation, which
    causes the exception. If this query is made during neutron
    initilization, Neutron service will fail to start.

    This fix changes the registration from function name to function
    pointer

    Change-Id: I44f7f1a222f80c9ce35f7d49610e52170f76dfd1

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → havana-rc1
importance: Undecided → High
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-rc1 → 2013.2
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.