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'
Reviewed: https:/ /review. openstack. org/202834 /git.openstack. org/cgit/ openstack/ networking- odl/commit/ ?id=6537676b899 192b7fa96789869 adce72ec8f7986
Committed: https:/
Submitter: Jenkins
Branch: master
commit 6537676b899192b 7fa96789869adce 72ec8f7986
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: I3d1842c2c0c95b dbaa689727a36c6 6e210f6273a
Related-Bug: #1371115
Closes-Bug: #1475450