Evacuated instances should be completed when ComputeHostNotFound
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Undecided
|
Unassigned |
Bug Description
Scenario 1:
- remove compute physically by format disk
- evacuate VMs from removed compute
- remove orphaned resource provider for removed compute
- add new compute with the same name as removed one
- migrate evacuated VMs on new compute
Expected result
===============
VMs are working correctly.
Actual result
=============
Definition of VMs are removed from libvirt.
Scenario 2:
- remove compute physically by format disk
- evacuate VMs from removed compute
- remove orphaned resource provider for removed compute
- add new compute with the same name as removed one
- restart nova_compute
Expected result
===============
Evacuations are completed on first run of nova_compute.
Actual result
=============
Evacuations are completed after restart.
Scenario 3:
- remove compute physically by format disk
- evacuate VMs from removed compute
- add new compute with the same name as removed one but using capital letters
- migrate evacuated VMs on new compute
Expected result
===============
VMs are working correctly on new compute.
Actual result
=============
Definitions of VMs are removed from libvirt.
Environment
===========
1. Openstack Train
Commit-Id: 4cf72ea6bfc58d3
Also occurs on master.
2. Libvirt + KVM
libvirtd (libvirt) 4.5.0
Proposed solution
=================
Evacuations should be completed when ComputeHostNotFound occurs.
Proposed patch
==============
diff --git a/nova/
index eaedc0238f.
--- a/nova/
+++ b/nova/
@@ -752,16 +752,16 @@ class ComputeManager(
- LOG.error("Failed to clean allocation of evacuated "
- "instance as the source node %s is not found",
- migration.
- continue
- cn_uuid = compute_
+ LOG.warning("Failed to clean allocation of evacuated "
+ "instance as the source node %s is not found",
+ migration.
+
+ cn_uuid = compute_
# If the instance was deleted in the interim, assume its
# allocations were properly cleaned up (either by its hosting
# compute service or the API).
- if (not instance.deleted and
+ if (cn_uuid and not instance.deleted and
Changed in nova: | |
status: | Incomplete → New |
Changed in nova: | |
status: | New → Confirmed |
What do you exactly mean by "Definitions of VMs are removed from libvirt." ?
Which migration are you doing ? I guess cold migrate ? If so, are you confirming the resize or do you have a config option value for it ?
https:/ /docs.openstack .org/api- ref/compute/ ?expanded= migrate- server- migrate- action- detail# migrate- server- migrate- action
TBH, I don't really see a problem with what you say : if you recreate a nova-compute service, you need to restart it for removing the evacuated instances, but I could maybe misunderstand your concerns.