full_sync uses unrelated context

Bug #1475450 reported by Isaku Yamahata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-odl
Fix Released
High
Isaku Yamahata

Bug Description

context passed to full sync is unrelated to the resource to be synced.

It may result in exception sometimes, it may result in ODL REST call error.

TRACE neutron.plugins.ml2.managers Traceback (most recent call last):
TRACE neutron.plugins.ml2.managers File "/neutron/neutron/plugins/ml2/managers.py", line 350, in _call_on_drivers
TRACE neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context)
TRACE neutron.plugins.ml2.managers File "/neutron/neutron/plugins/ml2/drivers/opendaylight/driver.py", line 84, in delete_subnet_postcomm

TRACE neutron.plugins.ml2.managers self.odl_drv.synchronize('delete', odl_const.ODL_SUBNETS, context)
TRACE neutron.plugins.ml2.managers File "/networking-odl/networking_odl/ml2/mech_driver.py", line 63, in synchronize
TRACE neutron.plugins.ml2.managers self.sync_full(context)
TRACE neutron.plugins.ml2.managers File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 252, in inner
TRACE neutron.plugins.ml2.managers return f(*args, **kwargs)
TRACE neutron.plugins.ml2.managers File "/networking-odl/networking_odl/ml2/mech_driver.py", line 157, in sync_full
TRACE neutron.plugins.ml2.managers self.sync_resources(collection_name, context)
TRACE neutron.plugins.ml2.managers File "/networking-odl/networking_odl/ml2/mech_driver.py", line 134, in sync_resources
TRACE neutron.plugins.ml2.managers attr_filter(resource, context)
TRACE neutron.plugins.ml2.managers File "/networking-odl/networking_odl/ml2/mech_driver.py", line 98, in filter_create_port_attributes
TRACE neutron.plugins.ml2.managers port['tenant_id'] = context._network_context._network['tenant_id']
TRACE neutron.plugins.ml2.managers AttributeError: 'SubnetContext' object has no attribute '_network_context'

Kyle Mestery (mestery)
Changed in networking-odl:
importance: Undecided → High
milestone: none → 1.0.0
assignee: nobody → Isaku Yamahata (yamahata)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-odl (master)

Reviewed: https://review.openstack.org/202834
Committed: https://git.openstack.org/cgit/openstack/networking-odl/commit/?id=6537676b899192b7fa96789869adce72ec8f7986
Submitter: Jenkins
Branch: master

commit 6537676b899192b7fa96789869adce72ec8f7986
Author: Isaku Yamahata <email address hidden>
Date: Thu Jul 16 15:08:32 2015 -0700

    mech_driver: full_sync uses unrelated context for resources

    context passed to full sync is unrelated to the resource to be synced.
    When necessary, the context needs to be created for the resource

    Change-Id: I3d1842c2c0c95bdbaa689727a36c66e210f6273a
    Related-Bug: #1371115
    Closes-Bug: #1475450

Changed in networking-odl:
status: In Progress → Fix Committed
Kyle Mestery (mestery)
Changed in networking-odl:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-odl (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/225191

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-odl (stable/kilo)

Reviewed: https://review.openstack.org/225191
Committed: https://git.openstack.org/cgit/openstack/networking-odl/commit/?id=869d97a11ed80059ae5048b6e7acf06fea231031
Submitter: Jenkins
Branch: stable/kilo

commit 869d97a11ed80059ae5048b6e7acf06fea231031
Author: Isaku Yamahata <email address hidden>
Date: Thu Jul 16 15:08:32 2015 -0700

    mech_driver: full_sync uses unrelated context for resources

    context passed to full sync is unrelated to the resource to be synced.
    When necessary, the context needs to be created for the resource

    Change-Id: I3d1842c2c0c95bdbaa689727a36c66e210f6273a
    Related-Bug: #1371115
    Closes-Bug: #1475450
    (cherry picked from commit 6537676b899192b7fa96789869adce72ec8f7986)

tags: added: in-stable-kilo
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.