Rollback db session in case of error during releasing quota reservation
Patch [1] changed to not fail if DBError will happend when releasing
quota reservation. That may lead to the errors while commiting db
transaction in the neutron/api/v2/base.py module when in same
transaction Neutron commits reservation (which removes reservation from
db) and then set resources dirty. In case if DB error happens in the
commit_reservation() and we will simply pass this error and move on,
transaction can't be commited without rollback.
This patch adds handle of such DBErrors in the remove_reservation
function so transaction can be rolled back in case of DB error happens.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/809191 /opendev. org/openstack/ neutron/ commit/ f8f50397ca1e4ab 7f5f31b19dde255 ab70b4ccaf
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit f8f50397ca1e4ab 7f5f31b19dde255 ab70b4ccaf
Author: Slawek Kaplonski <email address hidden>
Date: Wed Sep 15 15:47:35 2021 +0200
Rollback db session in case of error during releasing quota reservation
Patch [1] changed to not fail if DBError will happend when releasing api/v2/ base.py module when in same reservation( ) and we will simply pass this error and move on,
quota reservation. That may lead to the errors while commiting db
transaction in the neutron/
transaction Neutron commits reservation (which removes reservation from
db) and then set resources dirty. In case if DB error happens in the
commit_
transaction can't be commited without rollback.
This patch adds handle of such DBErrors in the remove_reservation
function so transaction can be rolled back in case of DB error happens.
[1] https:/ /review. opendev. org/c/openstack /neutron/ +/805031
Closes-Bug: #1943714 286f0e34b96db29 c8f08340b84
Change-Id: I295a4f0eb1eaf0