[nova][ptg] Summary: Server group [anti-]affinity

Eric Fried openstack at fried.cc
Mon May 6 19:32:10 UTC 2019

The Issue: Doing server group affinity ("land all these instances on the
same host") and anti-affinity ("...on different hosts") on the nova side
is problematic in large deployments (like CERN). We'd like to do it on
the placement side - i.e. have GET /allocation_candidates return [just
the one host to which servers in the group are being deployed]
(affinity); or [only hosts on which servers in the group have not yet
landed] (anti-affinity).

- Affinity is fairly easy: ?in_tree=<host on which any existing instance
in my server group has been deployed>.
- For anti-affinity, we need something like ?in_tree=!<inst.host for
inst in server_group>.
- The size of <the list> in the latter case could quickly get out of
hand, exceeding HTTP/wsgi (querystring length) and/or database query
(`AND resource_provider.uuid NOT IN <the list>`) limits.
- Race conditions in both cases are a little tricky.
- tssurya to come up with spec(s) for ?in_tree=!<list> and nova usage
thereof, wherein discussions of the above issues can occur.
- Unclear if this will make Train.


More information about the openstack-discuss mailing list