1 Commits

Author SHA1 Message Date
Matt Riedemann
91f5af7ee7 Trim the fat on HostState.instances
The only in-tree filters that rely on HostState.instances
are the affinity filters (and one of the weighers). And they
don't even look at the values in the HostState.instances dict,
just the keys (which are the instance uuids for the instances
on the host).

So rather than pull the full instance objects, we can just get
the list of instance uuids off the host and fake out the object.

Custom filters/weighers will still be able to lazy-load fields
on the Instance objects in HostState.instances if needed, but
it will mean a performance penalty due to the round trip to the
database per instance, per host. Out of tree filters/weighers
are encouraged to be contributed upstream.

Related to blueprint put-host-manager-instance-info-on-a-diet

Related-Bug: #1737465

Change-Id: I766bb5645e3b598468d092fb9e4f18e720617c52
2018-06-01 12:14:23 -04:00