neutron/releasenotes
Rodolfo Alonso Hernandez 23f956ab37 Execute the quota reservation removal in an isolated DB txn
The goal of [1] is to, in case of failing when removing the quota
reservation, continue the operation. Any expired reservation will
be removed automatically in any driver.

If the DB transaction fails, it should affect only to the reservation
trying to be deleted. This is why this patch isolates the
"remove_reservation" method and guarantees it is called outside an
active DB session. That guarantees, in case of failure, no other DB
operation will be affected.

This patch also partially reverts [2] but still checks the security
group rule quota when a new security group is created. Instead of
creating and releasing a quota reservation for the security group
rules created, now only the available quota limit is checked before
creating them. That won't prevent another operation to create security
group rules in parallel, exceeding the available quota. However, this
is not even guaranteed with the current quota driver.

[1]https://review.opendev.org/c/openstack/neutron/+/805031
[2]https://review.opendev.org/c/openstack/neutron/+/701565

Closes-Bug: #1943714

Conflicts:
    neutron/tests/unit/db/quota/test_driver.py
    neutron/db/quota/driver.py

Change-Id: Id73368576a948f78a043d7cf0be16661a65626a9
(cherry picked from commit 603abeb977)
2021-09-30 17:52:21 +00:00
..
notes Execute the quota reservation removal in an isolated DB txn 2021-09-30 17:52:21 +00:00
source Update master for stable/wallaby 2021-03-26 15:27:20 +00:00