Re-use callers session in ML2 DB methods

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

Bug Description

The get_port_from_device_mac() and get_sg_ids_grouped_by_port() methods in ML2 db.py module
do not use a session passed in from the caller, but instead create a new session.
This should be changed so that the caller's session is passed in to be consistent with
other methods in ML2 db.py.

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/173320

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/173320
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=47dd65cf986d712e9c6ca5dcf4420dfc44900b66
Submitter: Jenkins
Branch: master

commit 47dd65cf986d712e9c6ca5dcf4420dfc44900b66
Author: Dane LeBlanc <email address hidden>
Date: Tue Apr 14 09:18:18 2015 -0400

    Reuse caller's session in ML2 DB methods

    This patch changes the get_port_from_device_mac() and
    get_sg_ids_grouped_by_port() methods in ML2 db.py module so that
    they do not create a new database session (via get_session()), but
    instead reuse the session associated with the caller's context.

    In order to make the session that is associated with the caller's
    context available to these ML2 DB methods, the
    get_ports_from_devices plugin API in securitygroups_rps_base.py
    needs to be modified so that the context can be passed down to the
    ML2 plugin. (A similar change is made to the get_port_from_device
    plugin API for consistency.)

    Change-Id: I3f990895887e156de929bd7ac3732df114dd4a4b
    Closes-Bug: 1441205

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (neutron-pecan)

Fix proposed to branch: neutron-pecan
Review: https://review.openstack.org/185072

Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-1 → 7.0.0
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.