Hi
I logged the following bug
https://bugs.launchpad.net/nova/+bug/1634269

I sent out review below please let me know if I am on right track

https://review.openstack.org/#/c/387687/

Ajay




From: Kevin Benton <ke...@benton.pub<mailto:ke...@benton.pub>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" 
<openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>
Date: Friday, October 14, 2016 at 1:23 AM
To: "OpenStack Development Mailing List (not for usage questions)" 
<openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>
Subject: Re: [openstack-dev] [openstack][nova] Port unbound from active VM

I suggest filing a bug against nova for this.

On Thu, Oct 13, 2016 at 9:44 AM, Ajay Kalambur (akalambu) 
<akala...@cisco.com<mailto:akala...@cisco.com>> wrote:
Any comments/input on this?
Ajay


From: Ajay Kalambur <akala...@cisco.com<mailto:akala...@cisco.com>>
Date: Monday, October 10, 2016 at 6:31 PM
To: "OpenStack Development Mailing List (not for usage questions)" 
<openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>
Subject: [openstack][nova] Port unbound from active VM

Hi
There seems to be a corner case bug in nova code. Steps to reproduce it are

  1.  Create a neutron port
  2.  Create a VM and launch instance with this port
  3.  Shutdown nova compute and network agent on compute node
  4.  Unbind port from VM and delete the VM (offline delete)
  5.  Now create a VM with same port but on a different compute node
  6.  Bring up nova compute on old node

It basically runs the reap for deleted instances and cleanes up VM from 
libvirt. In the process it unbinds the pre-existing ports and ends up unbinding 
the port from an active VM on a different compute node
Reason nova simply sends a blind port-update with binding_host: “” even if that 
port is bound to a different instance


So following fix seemed to help any suggestions on a better fix

In nova/network/neutronv2/api.py. So basically when neutron sees no ports for 
this instance don’t attempt an unbind
In this case
data = neutron.list_ports(**search_opts)
Call in deallocate_for_instance returns empty ports




      # Reset device_id and device_owner for the ports that are skipped

        if data.get('ports', []):

            self._unbind_ports(context, ports_to_skip, neutron)

        else:

            LOG.debug("Neutron sees a different view of this port hence 
skipping unbind”)



Ajay


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: 
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe<http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to