commit cb773098d276cfbabc600361e91cb709ec846ba8
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/470297 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=cb773098d27 6cfbabc600361e9 1cb709ec846ba8
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit cb773098d276cfb abc600361e91cb7 09ec846ba8
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.
Conflicts: plugins/ ml2/driver_ context. py plugins/ ml2/plugin. py tests/unit/ plugins/ ml2/test_ port_binding. py
neutron/
neutron/
neutron/
Closes-Bug: #1669528 53c082bade1f61a 3ee44ca41fc 31e8bf995f3f4f8 5bd6d81955)
Change-Id: Ib5ba2daa80acba
(cherry picked from commit 20c1de9dc838754