[openstack-dev] [neutron] Port leak when instance fails to boot normally

Matthew Gilliard matthew.gilliard at gmail.com
Tue Jun 3 13:03:36 UTC 2014


Bug report: https://bugs.launchpad.net/nova/+bug/1324934

TL;DR version of the bug report:  A dropped connection during nova->neutron
call to create a port will result in nova deciding that the instance can't
be booted, and therefore terminating it.  Nova calls get_ports() from
neutron during this termination, but an empty list is returned so no ports
are deleted.  However, the port actually is created, and associated to the
now-deleted instance.

I suspect there is a race condition between create_port and get_ports in
neutron, which could be fixed by using
@lockutils.synchronized(nstance_uuid) on those 2 methods.

I'm not very familiar with the neutron codebase though, and would
appreciate some feedback or discussion on how likely people think my
diagnosis and suggested fix are, and whether similar problems have been
found in the past.

  Thanks,

Matthew Gilliard
(HP Cloud)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140603/2b04897c/attachment.html>


More information about the OpenStack-dev mailing list