Comment 1 for bug 1763181

Revision history for this message
Chris Friesen (cbf123) wrote :

My suspicion is that when we call _validate_instance_group_policy() which calls group.get_hosts(), that we will only return the original hosts where they're evacuating *from*, not the host they're both evacuating *to*, because we don't set instance.host to the new host until the evacuation is basically done.

There's a second thing to worry about when we fix this, which is that we don't want both instances to detect a collision and fail...ideally we'd like one of them to succeed. The way we've done this internally is for each instance to compare itself against other instances in the same group that either 1) have id numbers smaller than the current instance so they were created earlier, or 2) have id numbers larger than the current instance but that have a vm_state that isn't BUILDING and a task_state that is None so that they are "established" on this host and won't be moving.