Race between delete_subnet and delete_network

Bug #1405197 reported by Eugene Nikanorov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Eugene Nikanorov
Juno
Fix Released
Medium
Eugene Nikanorov

Bug Description

If the code executes the following sequence:

delete_subnet(subnet_id)
delete_network(net_id)

where subnet subnet_id belongs to a network with net_id, there's a possible race condition between dhcp_port_release initiated by subnet deletion and deletion of service ports (DHCP) during network deletion.

Latter operation throws PortNotFound and network deletion stops.

The solution could be to just catch such error during port deletion.

The chance of catching this bug increases in the environment with multiple neutron servers where DB access could not be synchronized within one process.

tags: added: ml2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143698

Changed in neutron:
status: New → In Progress
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → kilo-2
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/143698
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8479921e111e1c306db76c52b33115cc5a77c420
Submitter: Jenkins
Branch: master

commit 8479921e111e1c306db76c52b33115cc5a77c420
Author: Eugene Nikanorov <email address hidden>
Date: Tue Dec 23 20:28:12 2014 +0300

    Catch PortNotFound and SubnetNotFound during network_delete

    In some cases PortNotFound exception during network_delete
    could be caused by concurrent port deletion by DHCP agent.
    This condition should not prevent network from deleting.

    Change-Id: Ie6eae4cecb64120c41de9823d9e72066094ad2ce
    Closes-Bug: #1405197

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
tags: added: in-stable-juno
tags: added: juno-backport-potential
removed: in-stable-juno
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/155324

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/juno)

Reviewed: https://review.openstack.org/155324
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c136f4fa1d93288318a5fce012687d3241939826
Submitter: Jenkins
Branch: stable/juno

commit c136f4fa1d93288318a5fce012687d3241939826
Author: Eugene Nikanorov <email address hidden>
Date: Tue Dec 23 20:28:12 2014 +0300

    Catch PortNotFound and SubnetNotFound during network_delete

    In some cases PortNotFound exception during network_delete
    could be caused by concurrent port deletion by DHCP agent.
    This condition should not prevent network from deleting.

    (cherry picked from 8479921e111e1c306db76c52b33115cc5a77c420)

    Change-Id: Ie6eae4cecb64120c41de9823d9e72066094ad2ce
    Closes-Bug: #1405197

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.