commit fc563eaabec392281be90bd2472bed4f6506cb40
Author: Kevin Benton <email address hidden>
Date: Fri Mar 3 08:51:33 2017 -0800
deepcopy binding and binding levels avoid expiration
Perform a deepcopy on the sqla objects passed into the PortContext
so we get detached versions of them safe to reference forever.
This is necessary because the PortContexts outlive the
transaction context managers they are creating in which means an
object can be expired and result in a query after a commit
(e.g. in bind_port_if_needed) that will fail and result in an
exception.
This required a few additional explicit session.merge calls to deal
with cases where touching the mech context was implicitly expected
to modify the DB state on the next commit.
Reviewed: https:/ /review. openstack. org/441231 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=fc563eaabec 392281be90bd247 2bed4f6506cb40
Committed: https:/
Submitter: Jenkins
Branch: master
commit fc563eaabec3922 81be90bd2472bed 4f6506cb40
Author: Kevin Benton <email address hidden>
Date: Fri Mar 3 08:51:33 2017 -0800
deepcopy binding and binding levels avoid expiration
Perform a deepcopy on the sqla objects passed into the PortContext if_needed) that will fail and result in an
so we get detached versions of them safe to reference forever.
This is necessary because the PortContexts outlive the
transaction context managers they are creating in which means an
object can be expired and result in a query after a commit
(e.g. in bind_port_
exception.
This required a few additional explicit session.merge calls to deal
with cases where touching the mech context was implicitly expected
to modify the DB state on the next commit.
Closes-Bug: #1669528 53c082bade1f61a 3ee44ca41fc
Change-Id: Ib5ba2daa80acba