OpenStack Compute (Nova)
Go to file
Matt Riedemann a1a335f19a Avoid unnecessary joins in HostManager._get_instances_by_host
While getting a HostState object for a given compute node during
scheduling, if the HostState does not have its instance info
set, either because it's out of date or because config option
"track_instance_changes" is False, the HostManager still pulls
the list of instances for that host from the database and stores
it in HostState.instances.

This is *only* used (in-tree) by the affinity filters and even
then the only thing those filters use from HostState.instances
is the set of keys from the dict, which is the list of instance
UUIDs on a given host. The actual Instance objects aren't used
at all. See blueprint put-host-manager-instance-info-on-a-diet
for more details on that.

The point of this change, is that when we go to pull the set
of instances from the database for a given host, we don't need
to join on the default columns (info_cache and security_groups)
defined in the _instance_get_all_query() method in the DB API.

This should be at least some minor optimization in scheduling
for hosts that have several instances on them in a large cloud.
As noted in the comment in the code, any out of tree filters
that rely on using the info_cache or security_groups from the
instance are now going to be hit with a lazy-load penalty
per instance, but we have no contract on out of tree filters
so if this happens, the people maintaining said filters can
(1) live with it (2) fork the HostManager code or (3) upstream
their filter so it's in-tree.

A more impactful change would be to refactor
HostManager._get_host_states to bulk query the instances on
the given set of compute nodes in a single query per cell. But
that is left for a later change.

Change-Id: Iccefbfdfa578515a004ef6ac718bac1a49d5c5fd
Partial-Bug: #1737465
2018-05-18 23:05:47 +00:00
api-guide/source Merge "Deprecate the nova-consoleauth service" 2018-05-08 04:21:43 +00:00
api-ref/source [doc] Add soft_deleted flag 2018-05-09 14:41:30 +00:00
contrib trivial: Remove "vif" script 2017-08-07 16:00:10 +01:00
devstack Skip ServerActionsTestJSON.test_rebuild_server for cells v1 job 2018-05-09 11:17:28 -04:00
doc Merge "Fix typo in NUMATopologyFilter docs" 2018-05-18 18:18:18 +00:00
etc/nova Convert users of tune2fs to privsep. 2018-02-28 07:14:51 +11:00
gate Make nova-manage db purge take --all-cells 2018-03-08 09:26:49 -08:00
nova Avoid unnecessary joins in HostManager._get_instances_by_host 2018-05-18 23:05:47 +00:00
placement-api-ref/source placement: Granular GET /allocation_candidates 2018-05-08 11:54:30 -05:00
playbooks/legacy Merge "Migrate tempest-dsvm-multinode-live-migration job in-tree" 2018-05-10 04:39:52 +00:00
releasenotes Merge "Deprecate running API services under eventlet" 2018-05-17 15:59:25 +00:00
tools Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
.coveragerc Remove nova/openstack/* from .coveragerc 2016-10-12 16:20:49 -04:00
.gitignore Fix test runner config issues with os-testr 1.0.0 2017-09-13 17:11:57 -04:00
.gitreview Add .gitreview config file for gerrit. 2011-10-24 15:07:19 -04:00
.mailmap Add mailmap entry 2014-05-07 12:14:26 -07:00
.stestr.conf Finish stestr migration 2017-11-24 16:51:12 -05:00
.zuul.yaml Merge "add lower-constraints job" 2018-05-15 01:12:25 +00:00
CONTRIBUTING.rst Update links in documents 2018-01-12 17:05:11 +08:00
HACKING.rst Removed unnecessary parantheses in yield statements 2018-03-07 16:44:36 +09:00
LICENSE initial commit 2010-05-27 23:05:26 -07:00
MAINTAINERS Fix broken URLs 2017-09-07 15:42:31 +02:00
README.rst Docs: modernise links 2018-03-24 20:27:11 +08:00
babel.cfg Get rid of distutils.extra. 2012-02-08 19:30:39 -08:00
bindep.txt Merge "Bindep does not catch missing libpcre3-dev on Ubuntu" 2018-02-14 07:31:09 +00:00
lower-constraints.txt Cleanup ugly stub in TestLocalDeleteAllocations 2018-05-16 09:23:55 -04:00
requirements.txt Add retrying to requirements.txt 2018-05-15 16:49:41 -04:00
setup.cfg Remove [scheduler]/host_manager config option 2018-05-03 09:39:26 -04:00
setup.py Updated from global requirements 2017-03-02 11:50:48 +00:00
test-requirements.txt Cleanup ugly stub in TestLocalDeleteAllocations 2018-05-16 09:23:55 -04:00
tests-py3.txt Remove mox in unit/virt/xenapi/test_vmops.py 2018-05-06 22:31:05 +00:00
tox.ini Merge "add lower-constraints job" 2018-05-15 01:12:25 +00:00

README.rst

Team and repository tags

image

OpenStack Nova

OpenStack Nova provides a cloud computing fabric controller, supporting a wide variety of compute technologies, including: libvirt (KVM, Xen, LXC and more), Hyper-V, VMware, XenServer, OpenStack Ironic and PowerVM.

Use the following resources to learn more.

API

To learn how to use Nova's API, consult the documentation available online at:

For more information on OpenStack APIs, SDKs and CLIs in general, refer to:

Operators

To learn how to deploy and configure OpenStack Nova, consult the documentation available online at:

In the unfortunate event that bugs are discovered, they should be reported to the appropriate bug tracker. If you obtained the software from a 3rd party operating system vendor, it is often wise to use their own bug tracker for reporting problems. In all other cases use the master OpenStack bug tracker, available at:

Developers

For information on how to contribute to Nova, please see the contents of the CONTRIBUTING.rst.

Any new code must follow the development guidelines detailed in the HACKING.rst file, and pass all unit tests.

Further developer focused documentation is available at:

Other Information

During each Summit and Project Team Gathering, we agree on what the whole community wants to focus on for the upcoming release. The plans for nova can be found at: