← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1441488] Re: stale db objects due to session reuse

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1441488

Title:
  stale db objects due to session reuse

Status in neutron:
  Expired

Bug description:
  many of neutron code seems to be written without considering
  the reuse of session and its associated object cache.

  it's a problem for UTs where admin context (and thus its session) is
  reused heavily.  here's an example of the failure [1].
  but there might be non-test code possibly affected.

  switching to expire_on_commit=True might improve the situation.
  but it doesn't entirely solve the problem because some of read-only
  queries are done without explicit transactions.

  [1] http://logs.openstack.org/82/158182/5/check/gate-neutron-python27/402b450/
  Traceback (most recent call last):
    File "neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py", line 864, in test_host_changed_twice
      mock.ANY, 'remove_fdb_entries', expected)
    File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/mock.py", line 831, in assert_called_with
      raise AssertionError('Expected call: %s\nNot called' % (expected,))
  AssertionError: Expected call: _notification_fanout(<ANY>, 'remove_fdb_entries', {u'58de62e4-5001-485b-a334-b65c3da97745': {'segment_id': 1, 'ports': {'20.0.0.1': [('00:00:00:00:00:00', '0.0.0.0'), PortInfo(mac_address=u'12:34:56:78:fa:4a', ip_address=u'10.0.0.2')]}, 'network_type': 'vxlan'}})
  Not called

  in this case, get_device_details saw a stale PortBinding object (with
  a different host) left by update_device_up.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1441488/+subscriptions


References