Bug 1806963
| Summary: | Succeed to delete subnet while trying to attach that subnet to the router | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Alex Katz <akatz> |
| Component: | openstack-neutron | Assignee: | Slawek Kaplonski <skaplons> |
| Status: | CLOSED WONTFIX | QA Contact: | Eran Kuris <ekuris> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 13.0 (Queens) | CC: | amuller, chrisw, scohen |
| Target Milestone: | --- | Keywords: | Triaged, ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-17 16:06:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Alex Katz
2020-02-25 11:16:29 UTC
So that is indeed race condition between removing of subnet and removing subnet's interface from the router. In "normal" case when You are doing first deletion of subnet, it should fail with error like: Failed to delete subnet with name or ID...One or more ports have an IP allocation from this subnet But in this case as first subnet is removed from the router, on db side all is good but later on l3 agent's side it's not fine. So IMO we need to add some prevention against such strange case on L3 agent's side and it should be good. I don't think this is very critical issue in fact as this is kind of corner case and shouldn't happened too often in real life.
After some more digging into it I found that minimal reproducer for this issue is something like:
openstack subnet create --subnet-pool demo-subnetpool4 --prefix-length 27 --network the_new_network_1 the_new_subnet_1;
openstack router add subnet the_other_router the_new_subnet_1 &
openstack subnet delete the_new_subnet_1 &
And the real problem is on server side as sometimes in such case there is one router's interface left without fixed ips, like:
neutron port-show b0db49d0-1c70-4e4c-a46d-9ac34a22ba7c
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+-----------------------+---------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | devstack-ubuntu-ovs |
| binding:profile | {} |
| binding:vif_details | {"connectivity": "l2", "port_filter": true, "ovs_hybrid_plug": false, "datapath_type": "system", "bridge_name": "br-int"} |
| binding:vif_type | ovs |
| binding:vnic_type | normal |
| created_at | 2020-03-02T01:01:28Z |
| description | |
| device_id | 4a650478-54cb-4270-9dcc-fc3383971b2e |
| device_owner | network:router_interface |
| extra_dhcp_opts | |
| fixed_ips | |
| id | b0db49d0-1c70-4e4c-a46d-9ac34a22ba7c |
| ip_allocation | immediate |
| mac_address | fa:16:3e:1e:6e:d0 |
| name | |
| network_id | 5ac97c24-7c51-47cd-b006-aec70b59fdc7 |
| port_security_enabled | False |
| project_id | 0c5d93b067784b609fb5d07873e1b80d |
| qos_network_policy_id | |
| qos_policy_id | |
| resource_request | |
| revision_number | 4 |
| security_groups | |
| status | DOWN |
| tags | |
| tenant_id | 0c5d93b067784b609fb5d07873e1b80d |
| updated_at | 2020-03-02T01:01:31Z |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------+
|