[openstack-dev] [nova] vif unplugging when deleting instance while resizing
chris.friesen at windriver.com
Fri Oct 30 23:53:44 UTC 2015
On 10/30/2015 03:11 PM, Chris Friesen wrote:
> From what I can tell, in stable/kilo with neutron when doing a resize we will
> only unplug the vifs on the source side when confirming the resize. The code
> path looks like:
> I'm concerned that if we delete the instance before the vm_state hits RESIZED,
> then we will not ever confirm the resize on the host. (I think this could
> happen since the instance host is set to the destination in
> compute.manager.ComputeManager.resize_instance(), but the vm_state isn't set to
> RESIZED until compute.manager.ComputeManager._finish_resize().
> Then the audit from bug 1392527 runs and cleans up the instance files left on
> the host, but we're left with the vswitch port still in use because nobody
> unplugged it.
> Can anyone poke holes in the description above?
> The above is all supposition, I haven't reproduced it or gone through it in
> enough detail to be certain that this is what's happening. That's the next step.
Some evidence to support the above theory...
I put a "pdb.set_trace()" in _finish_resize() right before the line with
instance.vm_state = vm_states.RESIZED
I then triggered a cold migration, and when it hit the debug statement I ran
"nova delete <instance>" from the CLI and then let the nova-compute process
This results in the instance being deleted, but a vswitch port is left open on
the source host.
More information about the OpenStack-dev