commit 91f5af7ee7f7140eafb7237875f6cd6ea1abcd38
Author: Matt Riedemann <email address hidden>
Date: Thu May 17 16:06:39 2018 -0400
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
Reviewed: https:/ /review. openstack. org/569247 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=91f5af7ee7f 7140eafb7237875 f6cd6ea1abcd38
Committed: https:/
Submitter: Zuul
Branch: master
commit 91f5af7ee7f7140 eafb7237875f6cd 6ea1abcd38
Author: Matt Riedemann <email address hidden>
Date: Thu May 17 16:06:39 2018 -0400
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: I766bb5645e3b59 8468d092fb9e4f1 8e720617c52