Comment 0 for bug 1626230

Revision history for this message
Paul Carlton (paul-carlton2) wrote : evacuate leaves instance on target compute node if it fails to spawn

When an instance is evacuated an attempt to rebuild it on a different host is made. If the instance spawn method in the libvirt driver (probably true for other drivers too) fails and raises and exception then the instance is placed in an error state. However the instance is still recorded a being on the source node but depending on how far through the spawn instance related files will be present and the instance may be running on the target.

In the case where compute nodes do not use shared storage a subsequent attempt to evacuate the instance to the same target will fail because the instance directory is already present.

The use of reset-state and then evacuate to another node will enable the successful evacuation of the instance. However the 'orphaned' files and running instance on the original target will need to be cleaned up manually.

I'd recommend we update the instance's host once the claim is complete on the target. In this case in the event of a failure to spawn it will effectively have evacuated so the files on the original host will be cleaned up when that node is restored.