Public bug reported:

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

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
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 OpenStack Neutron (virtual network service):
  New

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

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to