← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1356157] [NEW] make nova floating-ip-delete atomic with neutron

 

Public bug reported:

The infra guys were noticing an issue where they were leaking floating ip
addresses. One of the reasons this would occur for them is they called
nova floating-ip-delete which first disassocates the floating-ip in neutron
and then deletes it. Because it makes two calls to neutron if the first one
succeeds and the second fails it results in the instance no longer being
associated with the floatingip. They have retry logic but they base it on
the instance and when they go to retry cleaning up the instance the floatingip
is no longer on the instance so they never delete it.  

This patch fixes this issue by directly calling delete_floating_ip instead
of releasing first if using neutron as neutron allows this. I looked into 
doing the same thing for nova-network but the code is written to prevent this.
This allows the operation to be atomic. I know this is sorta hackish that
we're doing this in the api layer but we do this in a few other places
too fwiw.

** Affects: nova
     Importance: High
     Assignee: Aaron Rosen (arosen)
         Status: In Progress


** Tags: network

** Changed in: nova
   Importance: Undecided => High

** Changed in: nova
     Assignee: (unassigned) => Aaron Rosen (arosen)

** Tags added: network

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1356157

Title:
  make nova floating-ip-delete atomic with neutron

Status in OpenStack Compute (Nova):
  In Progress

Bug description:
  The infra guys were noticing an issue where they were leaking floating ip
  addresses. One of the reasons this would occur for them is they called
  nova floating-ip-delete which first disassocates the floating-ip in neutron
  and then deletes it. Because it makes two calls to neutron if the first one
  succeeds and the second fails it results in the instance no longer being
  associated with the floatingip. They have retry logic but they base it on
  the instance and when they go to retry cleaning up the instance the floatingip
  is no longer on the instance so they never delete it.  

  This patch fixes this issue by directly calling delete_floating_ip instead
  of releasing first if using neutron as neutron allows this. I looked into 
  doing the same thing for nova-network but the code is written to prevent this.
  This allows the operation to be atomic. I know this is sorta hackish that
  we're doing this in the api layer but we do this in a few other places
  too fwiw.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1356157/+subscriptions


Follow ups

References