I think I was able to reproduce the problem in a fresh single node devstack [1].
The GroupAntiAffinityFilter printed the following when scheduled the second instance:
Group anti affinity: check if ubuntu not in [] {{(pid=25524) host_passes /opt/stack/nova/nova/scheduler/filters/affinity_filter.py:105}}
This means that the instance_group.hosts field is empty during the second scheduling towards the same host the first instance is already running on [2].
It felt like I'm booting the two instances two quickly and hitting a race. So I waited couple of minutes and tried a 3rd instance. But that also placed to the same (and only) compute host.
I think I was able to reproduce the problem in a fresh single node devstack [1].
The GroupAntiAffini tyFilter printed the following when scheduled the second instance:
Group anti affinity: check if ubuntu not in [] {{(pid=25524) host_passes /opt/stack/ nova/nova/ scheduler/ filters/ affinity_ filter. py:105} }
This means that the instance_ group.hosts field is empty during the second scheduling towards the same host the first instance is already running on [2].
It felt like I'm booting the two instances two quickly and hitting a race. So I waited couple of minutes and tried a 3rd instance. But that also placed to the same (and only) compute host.
[1] http:// paste.openstack .org/show/ 725339/ /github. com/openstack/ nova/blob/ fcf406003bcde2b 60a515f694f2640 e27a9d65fd/ nova/scheduler/ filters/ affinity_ filter. py#L101- L105
[2] https:/