Comment 2 for bug 1934742

Revision history for this message
Alexandre arents (aarents) wrote :

There is still more cases where we can leak,
that the first proposed fix do not cover:

Let's enumerates all issues A) B) C):

A) _process_instance_vif_deleted_event can pass completly
in the middle of an attaching interface, this is what
explain the bug description and it is fix by
https://review.opendev.org/c/openstack/nova/+/799606 patchset 1

B) _process_instance_vif_deleted_event is called with
instance object that do not contains the vif in infos cache.
When a port is attaching, compute manager first do a port
binding and after update network info_cache in DB.
between both operation, if there is a neutron PORT DELETE,
neutron send an API CALL to nova in order to
trigger network network-vif-deleted
The issue is nova api create instance obj from db
that do not yet contains the attached interface
(info_cache not yet updated by compute mgr)
And while processing _process_instance_vif_deleted_event
we never enter in the condtion:
if vif['id'] == deleted_vif_id, so we leak.

C) 'network-change' OR _heal_instance_info_cache()
(all that is running network_api.get_instance_nw_info() )
processing can detect and drop vif entry in cache before
'network-vif-deleted' run and we fall again in the B) issue.