Comment 4 for bug 1781710

Revision history for this message
Matt Riedemann (mriedem) wrote :

I think it's pretty clear at this point that the issue is we stopped checking the instance_group.hosts in the ServerGroupAntiAffinityFilter:

        group_hosts = (spec_obj.instance_group.hosts
                       if spec_obj.instance_group else [])
        LOG.debug("Group anti affinity: check if %(host)s not "
                  "in %(configured)s", {'host': host_state.host,
                                        'configured': group_hosts})
        if group_hosts:
            return host_state.host not in group_hosts

And we are now relying on this:

        # The list of instances UUIDs on the given host
        instances = set(host_state.instances.keys())

Which doesn't get set within the same request when we call HostState.consume_from_request, and that introduces the race.