]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Call _allocate_vr_id outside of transaction
authorKevin Benton <blak111@gmail.com>
Thu, 24 Dec 2015 08:54:06 +0000 (00:54 -0800)
committerKevin Benton <blak111@gmail.com>
Thu, 24 Dec 2015 09:00:32 +0000 (01:00 -0800)
commit18e2117e3df3c119f843aed669d0c6bae9243053
tree12e28023f11f8a73536dceed52dbbd118b9a2e11
parent1a0cbdff7800e2ecb030a69da1b8e7c9d85d4ad8
Call _allocate_vr_id outside of transaction

_allocate_vr_id is called from _set_vr_id, which was starting a
transaction before calling it. This caused an error when the retry
logic was triggered inside of _allocate_vr_id since it would
encounter a DB exception and put the transaction into a bad state
that couldn't be used on the retry.

This patch just stops _set_vr_id from starting a transaction because
it didn't serve a purpose. It also stops _allocate_vr_id from allowing
subtransactions when it starts a transaction, since it's retry logic
isn't compatible with them.

Co-Authored-By: Ann Kamyshnikova <akamyshnikova@mirantis.com>
Closes-Bug: #1528201
Change-Id: If7bcae39098f40f5ee9db78d3190bf9fdaf6438b
neutron/db/l3_hamode_db.py