neutron/neutron/db
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
..
allowed_address_pairs Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
availability_zone remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
extra_dhcp_opt Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
metering Add source_ip_prefix and destination_ip_prefix to metering label rules 2020-09-30 12:26:01 +00:00
migration Add source_ip_prefix and destination_ip_prefix to metering label rules 2020-09-30 12:26:01 +00:00
models Set "floatingip.fixed_port" as viewonly 2021-07-19 14:51:38 +00:00
network_dhcp_agent_binding Move migration to proper dir and fix objects tests 2019-11-04 17:44:44 +00:00
port_security Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
qos Refactor qos_plugin._extend_port_resource_request 2019-07-05 08:10:01 +00:00
quota Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_utils.py Switch DB _utils to new engine facade 2019-05-28 18:35:13 -05:00
address_group_db.py Support Address Group CRUD as extensions 2020-08-12 13:59:31 -05:00
address_scope_db.py Allow sharing of address scopes via RBAC mechanism 2020-03-19 16:51:39 +02:00
agents_db.py Avoid writing segments to the DB repeatedly 2021-12-08 15:27:03 +01:00
agentschedulers_db.py Handle properly ObjectNotFound while deleting network from DHCP agent 2022-05-05 10:46:21 +00:00
allowedaddresspairs_db.py [DVR] Send allowed address pairs info to the L3 agents 2021-05-24 08:51:53 +00:00
data_plane_status_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
db_base_plugin_common.py Check for existence instead of fetching the whole net object 2021-04-22 08:27:54 +00:00
db_base_plugin_v2.py Remove exception ``IpAddressAllocationNotFound`` 2022-03-17 06:28:03 +00:00
dns_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
dvr_mac_db.py Optimize DVR related port DB query 2019-08-25 01:24:03 +08:00
external_net_db.py Remove leftovers of get_external_network_id for router 2020-02-28 10:53:29 +00:00
extradhcpopt_db.py Utilize bulk port creation ops in ml2 plugin 2019-03-21 11:31:36 +00:00
extraroute_db.py Implement extension: extraroute-atomic 2019-09-11 13:58:47 +02:00
flavors_db.py delete common_db_mixin 2019-04-17 11:25:41 -06:00
ipam_backend_mixin.py Improve Subnet update performance 2021-05-05 07:25:52 +00:00
ipam_pluggable_backend.py Allow to pass EUI64 IP address as fixed ip for the port 2022-10-10 12:34:19 +00:00
l3_agentschedulers_db.py L3 agent scheduler should return a valid index if manual scheduling 2020-06-24 15:37:23 +00:00
l3_attrs_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_db.py Allow shared net to be added on router 2022-11-08 08:51:18 +00:00
l3_dvr_db.py Remove FIP agent's gw port when L3 agent is deleted 2021-06-24 06:53:10 +00:00
l3_dvr_ha_scheduler_db.py Fix connection between 2 dvr routers 2018-11-01 18:01:25 +01:00
l3_dvrscheduler_db.py Clean up db residual record from dvr port 2022-08-10 12:21:28 +00:00
l3_fip_pools_db.py Introduce floating IP pool resource 2018-10-04 15:53:53 +00:00
l3_fip_port_details.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_fip_qos.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_gateway_ip_qos.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_gwmode_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
l3_hamode_db.py Improve terminology in the Neutron tree 2020-08-19 16:47:53 -04:00
l3_hascheduler_db.py Merge "Fix _notify_l3_agent_port_update when there is no binding host" 2020-03-15 03:13:52 +00:00
models_v2.py Lock subnets during port creation and subnet deletion 2020-04-23 16:43:19 +00:00
network_ip_availability_db.py Remove "six" library 2020-07-28 16:55:52 +00:00
ovn_hash_ring_db.py [OVN] Add hash ring methods 2019-12-03 08:53:45 +00:00
ovn_revision_numbers_db.py Refactor the OVN revision module to access the DB correctly 2022-05-15 01:42:54 +00:00
portbindings_base.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portbindings_db.py remove the neutron.db._model_query module 2019-01-25 08:55:25 -07:00
portsecurity_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portsecurity_db_common.py Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
provisioning_blocks.py [stable-only] Add writer DB context to "add_provisioning_component" 2022-10-01 02:16:08 +02:00
rbac_db_mixin.py rbac: Catch correct exception for duplicated entry 2019-06-06 19:23:17 +00:00
rbac_db_models.py Allow sharing of subnet pools via RBAC mechanism 2020-04-09 19:02:47 +03:00
securitygroups_db.py [stable-only] Do not fail making reservation when creating a SG 2022-11-13 11:44:27 +01:00
securitygroups_rpc_base.py [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-03-21 17:54:34 +08:00
segments_db.py Change provider network segmentation ID 2019-04-01 12:55:50 +00:00
servicetype_db.py Switch to new engine facade for ExtraRoute_dbonly_mixin 2019-06-28 10:30:56 +00:00
standard_attr.py shim standard_attr db for neutron-lib 2019-07-23 14:17:29 -06:00
standardattrdescription_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
subnet_service_type_mixin.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
uplink_status_propagation_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
vlantransparent_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00