neutron/neutron/db
Rodolfo Alonso Hernandez 1254f23718 Remove exception ``IpAddressAllocationNotFound``
This patch removes the ``IpAddressAllocationNotFound`` exception. This
exception was raised when a IPAM register was called to be deleted
but not found.

As reported in the LP bug, this IPAM register deletion can be called
several times if a port fails during the creation. The IPAM register
deletion calls the DB deletion but doesn't raise any exception if the
register does not exist. The code ensures the IPAM register is
deleted and there is no need to fail if it is not present anymore.

This patch also removes the exception catch and try in "update_port",
that was added in [0] as a fix for [1]. That was added because the
subnet deletion code involved a port update call [2] during the
IP allocation deletion, if any port was still present in the subnet.
Since [3], this code is not needed because the subnet deletion does
not call a port update anymore.

[0]https://review.opendev.org/c/openstack/neutron/+/373536
[1]https://bugs.launchpad.net/neutron/+bug/1622616
[2]https://github.com/openstack/neutron/blob/pike-em/neutron/db/db_base_plugin_v2.py#L1017-L1018
[3]https://review.opendev.org/c/openstack/neutron/+/713045

Closes-Bug: #1965807
Related-Bug: #1954763
Related-Bug: #1622616

Conflicts:
    neutron/ipam/exceptions.py

Change-Id: I5b96b3a91aacffe118ddbb91a75c4892818ba97a
(cherry picked from commit 83b6ce9e9e)
(cherry picked from commit 2a6a4ab5da)
2022-03-17 06:29:15 +00: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 Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
migration Add Rocky milestone tag for alembic migration revisions 2020-05-14 03:38:37 +00:00
models Set "floatingip.fixed_port" as viewonly 2021-07-19 14:52:14 +00:00
network_dhcp_agent_binding OVO for NetworkDhcpAgentBinding 2017-09-08 15:48:00 +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_scope_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
agents_db.py Avoid writing segments to the DB repeatedly 2022-02-11 09:13:44 +00:00
agentschedulers_db.py Schedule networks to new segments if needed 2021-03-16 15:01:23 +00:00
allowedaddresspairs_db.py [DVR] Send allowed address pairs info to the L3 agents 2021-05-24 11:10:46 +02: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:37:55 +00:00
db_base_plugin_v2.py Remove exception ``IpAddressAllocationNotFound`` 2022-03-17 06:29:15 +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 Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04: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:30:32 +00:00
ipam_pluggable_backend.py Allocate IPs in bulk requests in separate transactions 2021-12-23 15:23:28 +01:00
l3_agentschedulers_db.py Remove 'gateway_external_network_id' config option 2019-07-26 13:19:14 +02:00
l3_attrs_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_db.py Get only FIP ID on network delete 2021-04-22 08:49:59 +00:00
l3_dvr_db.py Remove FIP agent's gw port when L3 agent is deleted 2021-06-24 06:54:42 +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 Revert "DVR: Remove control plane arp updates for DVR" 2021-03-09 13:10:59 +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 Switch to new engine facade for L3_HA_NAT_db_mixin 2019-06-05 11:39:44 +00:00
l3_hascheduler_db.py Fix all pep8 E129 errors 2018-05-03 13:44:04 +09:00
models_v2.py Force "network_id" in "subnet" DB registers 2019-08-19 16:32:42 +00:00
network_ip_availability_db.py use context manager from neutron-lib 2018-10-24 07:18:46 -06: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 use callback payloads for PROVISIONING_COMPLETE 2019-07-31 09:18:14 -06: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 security groups via RBAC mechanism 2019-03-09 17:30:14 -06:00
securitygroups_db.py Don't try to create default SG when security groups are disabled 2021-02-08 10:32:57 +00:00
securitygroups_rpc_base.py Revert "[Security] fix allowed-address-pair 0.0.0.0/0 issue" 2021-01-20 17:02:06 +01: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