Activity log for bug #1733054

Date Who What changed Old value New value Message
2017-11-18 08:49:55 sunzuohua bug added bug
2017-11-18 08:50:38 sunzuohua neutron: assignee sunzuohua (zuohuasun)
2017-11-20 00:34:55 sunzuohua description The repro steps is as follows: 1.Create at least two ha router. 2.Delete one ha router. Then the ha network is not deleted, but the segment of this ha network is deleted. [root@cdpm01 ~]# neutron net-show 5edf9be2-2a07-4350-98dd-9d3c12a9b9dd neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +---------------------------+----------------------------------------------------+ | Field | Value | +---------------------------+----------------------------------------------------+ | admin_state_up | True | | availability_zone_hints | | | availability_zones | nova | | created_at | 2017-11-17T01:40:44Z | | description | | | id | 5edf9be2-2a07-4350-98dd-9d3c12a9b9dd | | ipv4_address_scope | | | ipv6_address_scope | | | mtu | 1450 | | name | HA network tenant a2794be2207a45b5be5b2423bfa08c2c | | port_security_enabled | True | | project_id | | | provider:network_type | | | provider:physical_network | | | provider:segmentation_id | | | qos_policy_id | | | revision_number | 5 | | router:external | False | | shared | False | | status | ACTIVE | | subnets | a356ecf7-c4a0-4596-b742-d1521a2aa38f | | tags | | | tenant_id | | | updated_at | 2017-11-17T09:26:25Z | +---------------------------+----------------------------------------------------+ The reason: 1.When a ha router is deleted, neutron attempted to delete the ha network. 2.When deleting a network, the event:events.BEFORE_DELETE for resources.NETWORK is send[[1]] and _delete_segments_for_network is invoked to delete the segment[2]. 3.After sending the event:events.BEFORE_DELETE for resources.NETWORK, the ha network is checked to be in use[3], so it is not deleted Mybe we should check if the network is in use before sending the event:events.BEFORE_DELETE for resources.NETWORK? [1]https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L433 [2]https://github.com/openstack/neutron/blob/master/neutron/services/segments/db.py#L315 [3]https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L435 The repro steps is as follows: 1.Create at least two ha router. 2.Delete one ha router. Then the ha network is not deleted, but the segment of this ha network is deleted. [root@cdpm01 ~]# neutron net-show 5edf9be2-2a07-4350-98dd-9d3c12a9b9dd neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +---------------------------+----------------------------------------------------+ | Field | Value | +---------------------------+----------------------------------------------------+ | admin_state_up | True | | availability_zone_hints | | | availability_zones | nova | | created_at | 2017-11-17T01:40:44Z | | description | | | id | 5edf9be2-2a07-4350-98dd-9d3c12a9b9dd | | ipv4_address_scope | | | ipv6_address_scope | | | mtu | 1450 | | name | HA network tenant a2794be2207a45b5be5b2423bfa08c2c | | port_security_enabled | True | | project_id | | | provider:network_type | | | provider:physical_network | | | provider:segmentation_id | | | qos_policy_id | | | revision_number | 5 | | router:external | False | | shared | False | | status | ACTIVE | | subnets | a356ecf7-c4a0-4596-b742-d1521a2aa38f | | tags | | | tenant_id | | | updated_at | 2017-11-17T09:26:25Z | +---------------------------+----------------------------------------------------+ The reason: 1.When a ha router is deleted, neutron attempted to delete the ha network. 2.When deleting a network, the event:events.BEFORE_DELETE for resources.NETWORK is send[[1]] and _delete_segments_for_network is invoked to delete the segment[2]. 3.After sending the event:events.BEFORE_DELETE for resources.NETWORK, the ha network is checked to be in use[3], so it is not deleted Mybe we should check if the network is in use before sending the event:events.BEFORE_DELETE for resources.NETWORK? Or Check if the router being deleted is the last router belong to the tenant. [1]https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L433 [2]https://github.com/openstack/neutron/blob/master/neutron/services/segments/db.py#L315 [3]https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L435
2017-11-20 15:02:37 Brian Haley marked as duplicate 1732543