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.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/809983 /opendev. org/openstack/ neutron/ commit/ 603abeb977d4018 963beade5c858b5 3f990ef32a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 603abeb977d4018 963beade5c858b5 3f990ef32a
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Sep 20 09:27:39 2021 +0000
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 reservation" method and guarantees it is called outside an
trying to be deleted. This is why this patch isolates the
"remove_
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 /review. opendev. org/c/openstack /neutron/ +/701565
[2]https:/
Closes-Bug: #1943714
Change-Id: Id73368576a948f 78a043d7cf0be16 661a65626a9