Config option image_compression_level only accepts minimum value 1 and
maximum value 9, so don't test other values out of the range.
Change-Id: I211b6426e7770e7a10eb4d3972af586cddf5254d
Related-Bug: #1517839
This fixes a problem in host NUMA node resource tracking when
there is an instance with no numa topology on the same node as
instances with numa topology.
It's triggered while running the resource audit, which ultimately
calls hardware.get_host_numa_usage_from_instance() and assigns
the result to self.compute_node.numa_topology.
The problem occurs if you have a number of instances with numa
topology, and then an instance with no numa topology. When running
numa_usage_from_instances() for the instance with no numa topology
we cache the values of "memory_usage" and "cpu_usage". However,
because instance.cells is empty we don't enter the loop. Since the
two lines in this commit are indented too far they don't get called,
and we end up appending a host cell with "cpu_usage" and
"memory_usage" of zero. This results in a host numa_topology cell
with incorrect "cpu_usage" and "memory_usage" values, though I think
the overall host cpu/memory usage is still correct.
The fix is to reduce the indentation of the two lines in question
so that they get called even when the instance has no numa topology.
This writes the original host cell usage information back to it.
Change-Id: I7e327b79b731393ed787c4e131dc6d9654f424d0
Closes-Bug: #1590607
The change modified instance filtering condition, which filters all
deleted instances on current host, which is not as expected by periodic
task.
The periodic task expects instances, whose instance uuid are associated
with migration record. And after filtering we only need to apply the
instance deletion logic on instance files where instance.host is not
set as current host (CONF.host).
This reverts commit 099cf53925.
Change-Id: Ic71c939bef86f1e5cb485c6827c69c3d638f2e89
Closes-Bug: 1589821
The skip_policy_check flag is used to skip the legacy v2 API
policy check points in the v2.1 API. The legacy v2 API is removed
and all the old policy check points removed also. This flag is
useless anymore, this patch cleanup them.
Partially implements blueprint remove-legacy-v2-api-code
Change-Id: Ia4a8d9954bf456253101b936f8b4ff513aaa73b2
This verifies all the parts of keypairs, including filling out all the
details for microversion 2.2 and 2.10 which change it.
Part of bp:api-ref-in-rst
Change-Id: Iab88dc75cdb7b5f91e46afd29ee61e38b325e180
An Inventory object has some legitimate constraints on its values
that should be reflected in the object. All numeric values that
have a default are non-negative.
The version of the object doesn't need to be updated because
we've not been passing these things around over RPC.
Change-Id: Iadfa041a419e8a7d6f4e3bb62989a08708aa8290
Partialy-Implements: blueprint generic-resource-pools
Needed by following code, this patch adds a simple InventoryList.find()
method that searches for a resource class in an InventoryList and
returns the inventory record matching that resource class, or None if
that resource class is not contained in the InventoryList.
Change-Id: I64757c2115f12788eab46627b0f0a2c8a37433f4
db.api.aggregate_get_by_uuid and objects.Aggregate.get_by_uuid
methods are added to make it possible to work with Aggregates by
their newly added uuid attribute.
Partially-Implements: blueprint generic-resource-pools
Change-Id: I7c46fd1ffebb6907c949cfa302131bfbfcd433de
This code makes hyper-v driver version agnostic
and allows to work with both apis, depending
on what version is considered as 'current'
partially implements bp use-glance-v2-api
Change-Id: I689faca79a7158357da75bd19aa0e2b58eb5a304
Now v2 API legacy code has been removed, functional
tests do not need to set the v2 extensions.
This patch removes the extension setting on osapi_compute_extension
flag.
Partially implements blueprint remove-legacy-v2-api-code
Change-Id: If5db4b141702fa94777fc5706dec6c3fb6c9c594
Add 'name' and 'generation' to the ResourceProvider object so that the
humane name and generation counter associated with the provider can be
persisted and used in display.
Change-Id: I5bc19065fdd2bbbeec67908f3feabbd43a492c89
Partially-Implements: blueprint generic-resource-pools