14 Nov
2019
14 Nov
'19
5:53 p.m.
On 11/14/2019 10:06 AM, Balázs Gibizer wrote:
If the evacuation succeeded, i.e. the migration is in 'done' state then we are OK. But if it is finished with 'error' or 'failed' state then we still have an instance on the host so we should not allow deleting the compute service. As far as I see get_count_by_hosts will cover this case.
If the evacuation succeeded then we need to detect it and cleanup the allocation from the evacuated-from-host because get_count_by_hosts won't catch that case (that's bug 1829479). That's the TODO in my patch. If the evacuation failed, I agree with you that get_count_by_hosts should detect and block the deletion of the service since the instance is still hosted there in the DB. -- Thanks, Matt