cleanup guest process when vm evacuate failed and then deleted

Bug #1947812 reported by Wenping Song
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Incomplete
Undecided
Wenping Song

Bug Description

when the nova_compute service is stopped and evacuate the vm on the host, then delete the vm when it is evacuating, the vm is local deleted by nova-api, but the libvirt process is not terminated, and the resources like GPU are still used by the vm process. from the code we can see when the host is init and the evacuation status is failed, this filter[1] cannot get the vm and the guest process is not destroy.[1]https://review.opendev.org/plugins/gitiles/openstack/nova/+/refs/heads/master/nova/compute/manager.py#703

Wenping Song (wenping1)
Changed in nova:
assignee: nobody → Wenping Song (wenping1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/814746

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

Not sure I understand the issue.
If a compute service is not running, then evacuated instances are indeed moved but they are still in the compute service, sure. Then, when restarting the compute service, indeed we look at the evacuated instances from this host and then we delete the guests by [1] as you said.

Why do you want to delete also guests that were not evacuated ? That would mean that if a operators wanted to evacuate some instance but got an issue, we would delete the guest when restarting the nova-compute service while the operator wasn't able to move the instance before.

[1] https://github.com/openstack/nova/blob/00452a403b57723b364477082ce1587a909b2a6b/nova/compute/manager.py#L1440

Putting the bug report to Incomplete, but please put it back to New once you reply.

Changed in nova:
status: New → Incomplete
Revision history for this message
Wenping Song (wenping1) wrote (last edit ):

the delete vm api doesnot intecept the evacuating vm, so the end use may delete while the vm is evacuating.
anyway, what will we do if the vm evacuates failed even we donot delete it during the vm is evacuating.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.