Avoid DetachedInstanceError after session rollback
In some cases this exception is thrown while accessing Agent
object from logging statement after a transaction was rolled back.
There is a unit test that covers thsi code patch, but the issue
is not reproducible with sqlite.
Just avoid accessing db object after session had been closed.
Reviewed: https:/ /review. openstack. org/158242 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=4d4de151e9a 0edd86b8ce5b055 e56a5784d5c08f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4d4de151e9a0edd 86b8ce5b055e56a 5784d5c08f
Author: Eugene Nikanorov <email address hidden>
Date: Mon Feb 23 13:29:08 2015 +0300
Avoid DetachedInstanc eError after session rollback
In some cases this exception is thrown while accessing Agent
object from logging statement after a transaction was rolled back.
There is a unit test that covers thsi code patch, but the issue
is not reproducible with sqlite.
Just avoid accessing db object after session had been closed.
Change-Id: Iff6b72156b08f1 77bd0c71f6ba93d 3bf46c82fa4
Closes-Bug: #1424578