]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Avoid ObjectDeletedError while accessing deleted binding
authorEugene Nikanorov <enikanorov@mirantis.com>
Tue, 24 Feb 2015 12:35:22 +0000 (15:35 +0300)
committerEugene Nikanorov <enikanorov@mirantis.com>
Thu, 26 Feb 2015 11:05:42 +0000 (14:05 +0300)
commitc8c07d6f47099bbe6070369db2d70a6294a9be33
treef5233ed6bf1feae6a8a078004506cc96a6e350c3
parent194afde3a64b70a934ec94f40550137ceacffbe2
Avoid ObjectDeletedError while accessing deleted binding

In some cases access to db object's attribute triggers its refresh.
When the object has been already removed from the database, it could
lead to ObjectDeletedError being thrown.
Unit test was added to cover code path where the issue occurs
however issue doesn't seem to be reproducible with sqlite.

Change-Id: I0d6f9a91572c89cf7da1b66b880aeaa6b4b1987e
Closes-Bug: #1424593
neutron/db/agentschedulers_db.py
neutron/tests/unit/test_dhcp_scheduler.py