neutron/neutron/quota
Rodolfo Alonso Hernandez 90865c06af [stable-only] Do not fail making reservation when creating a SG
Do not fail during the creation of a security group when trying to
make a quota reservation for the security group rules. This feature
was added in [1], in order to prevent the rule quota excess during
the security group creation.

However, as reported in LP#1992161, this method can be called from
the RPC worker. If this RPC worker is spawned alone (not with the API
workers), the extensions are not loaded and the security group rule
quota resources are not created. That means the quota engine does not
have the security group rules as managed resources (in this worker).

When a new network (and the first subnet) is created, the DHCP agent
(or agents) handling this network will try to create the DHCP port.
If, as commented in the LP bug, the default security group is not
created, the RPC worker will try to create it. In this case this
patch skips the quota check.

This patch is for stable releases only. Since Xena, this check is
done using a new method called "quota_limit_check" [2]. This method
does not fail in the related case.

[1]https://review.opendev.org/q/I0a9b91b09d6260ff96fdba2f0a455de53bbc1f00
[2]https://review.opendev.org/q/Id73368576a948f78a043d7cf0be16661a65626a9

Conflicts:
      neutron/db/securitygroups_db.py

Closes-Bug: #1992161
Related-Bug: #1858680
Change-Id: I0f20b17c1b13c3cf56de70588fca4a6956d276df
(cherry picked from commit 02bdd04702)
2022-11-13 11:44:27 +01:00
..
__init__.py [stable-only] Do not fail making reservation when creating a SG 2022-11-13 11:44:27 +01:00
resource_registry.py Remove "six" library 2020-07-28 16:55:52 +00:00
resource.py use context manager from neutron-lib 2018-10-24 07:18:46 -06:00