[nova][ptg] Summary: Server group [anti-]affinity
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). Summary: - 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. efried .
On Mon, May 6, 2019 at 3:35 PM Eric Fried <openstack@fried.cc> wrote:
- Race conditions in both cases are a little tricky.
So we currently have the late group policy check [1] done on the host itself during instance build. It'd be great if we can get rid of the need for it with this work, or at the very least make it very very unlikely to fail. I know it won't be easy though. [1] https://github.com/openstack/nova/blob/eae1f2257a9ee6e851182bf949568b1cfe2af...
- 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.
efried .
-- Artom Lifshitz Software Engineer, OpenStack Compute DFG
participants (2)
-
Artom Lifshitz
-
Eric Fried