OpenStack resource provider inventory allocation service
Go to file
Eric Fried 47a28bc4c3 Ensure resource classes correctly
Previously, SchedulerReportClient.set_inventory_for_provider used this
logic to pre-create custom resource classes found in the input
inventory.

        list(map(self._ensure_resource_class,
                 (rc_name for rc_name in inv_data
                  if rc_name not in fields.ResourceClass.STANDARD)))

...where _ensure_resource_class would always attempt to create the
resource class it was given, and raise an exception if that failed for
any reason.  Note in particular that attempting to create an
already-extant "standard" resource class will fail just the same as
attempting to create any nonexistent resource class that doesn't conform
to the schema (i.e. beginning with "CUSTOM_").

The problem is that this relies on the local system's notion of the set
of standard resource classes. If the placement service is running newer
code, standard resource classes may have been added that the compute
service doesn't know about yet.

This change set solves the problem by only attempting to create resource
classes with the 'CUSTOM_' prefix.

self._ensure_resource_class (which worked on a single resource class) is
replaced with self._ensure_resource_classes (plural) which accepts a
list of *all* the desired resource classes (including the standard
ones), filters down to the CUSTOM_* ones, and attempts to create the
remainder.

Note that if placement ever decides to start allowing creation of
resource classes with prefixes other than CUSTOM_, it will have to do so
under a new microversion, so we can't future-proof this by e.g.
prefetching all the known resource classes from placement and attempting
to create any not found in that list.

In the process of doing this rework, obsolete code paths relying on
pre-1.7 placement microversions are removed.

Change-Id: I600ed262e1b5d11facbf461e28291193665280cf
Closes-Bug: #1746615
2018-02-09 14:18:05 -06:00
api-ref/source Merge "Clean up metadata param in doc" 2017-04-03 12:39:18 +00:00
doc Remove a duplicate colon 2018-02-08 18:30:22 +09:00
etc/nova Add reference to policy sample 2018-01-09 07:49:26 +00:00
gate move gate hooks to gate/ 2017-01-04 11:05:16 +00:00
nova Ensure resource classes correctly 2018-02-09 14:18:05 -06:00
placement-api-ref/source [placement] Move body examples to an isolated directory 2018-02-08 21:59:19 +00:00
releasenotes/notes Merge "Log options at debug when starting API services under wsgi" 2018-02-01 21:27:09 +00:00
tools tox: make it possible to run pep8 on current patch only 2015-07-24 16:15:38 +01: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
.stestr.conf Finish stestr migration 2017-11-24 16:51:12 -05:00
.zuul.yaml Address comments from I51adbbdf13711e463b4d25c2ffd4a3123cd65675 2018-02-06 16:53:36 -05:00
CONTRIBUTING.rst Update links in documents 2018-01-12 17:05:11 +08:00
HACKING.rst fix link 2018-02-07 19:20:53 +08:00
LICENSE initial commit 2010-05-27 23:05:26 -07:00
README.rst doc: Rework README to reflect new doc URLs 2017-08-03 16:06:08 -04:00
babel.cfg Get rid of distutils.extra. 2012-02-08 19:30:39 -08:00
bindep.txt Update links in documents 2018-01-12 17:05:11 +08:00
requirements.txt Updated from global requirements 2018-02-01 07:20:35 +00:00
setup.cfg Deprecate the IronicHostManager 2017-11-28 15:23:48 -05:00
setup.py Updated from global requirements 2017-03-02 11:50:48 +00:00
test-requirements.txt Implement get_traits() for the ironic virt driver 2018-01-30 20:45:27 -05:00
tox.ini Merge "add whereto for testing redirect rules" 2018-01-25 06:48:57 +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: