Take three hosts, one with a single PCI device, one with many PCI
devices, and one with no PCI devices. Nova should prioritise these
differently based on the demands of the instance. If the instance
requests a single PCI device, then the first of the hosts should be
preferred. Similarly, if the instance requests multiple PCI devices,
then the second of these hosts would be preferred. Finally, if the
instance does not request a PCI device, then the last of these hosts
should be preferred.
While the first and second of these cases is already somewhat handled by
the NUMA topology filter (which will ensure the correct number and type
of PCI devices are available on the hosts), there is nothing to stop a
instance that *does not* require PCI devices from occupying space on one
of the few hosts that *does* have free PCI devices.
The PCIWeigher is designed to keep hosts with PCI device(s) as free as
possible, to best ensure they can satisfy requests from instances with
PCI requirements when called upon. This change ensures (a) an instance
with PCI requirements has the best possible chance of scheduling
successfully and (b) an instance without these requirements won't clog
up hosts that have these valuable resources.
Change-Id: I04bf7e6b8324dcac6c93b0cb69c38c30fb05be56
Partially Implements: blueprint reserve-numa-with-pci
html_last_updated_fmt option is interpreted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.
Changing Popen to .check_output because of 3 reasons:
1. check_output() will raise CalledProcessError if
the called process returns a non-zero return code.
2. For consistency with keystone [1] and cinder [2]
3. It makes the code look much better.
[1] https://review.openstack.org/#/c/457142/
[2] https://review.openstack.org/#/c/433081
Change-Id: Ia3e792c512da46c2b92d3ad9ec1657849d379052
The current rebuild testing in test_instance_action changes the image
used by the instance, therefore the actions tested in
test_instance_action had to be in specific order as testing rebuild
also changes the output json.
The rebuild test was moved from test_instance_action to its own method,
and now all the actions in test_instance_actions keeps the instance in
the same state.
Change-Id: Id0a7aaf8575d69deb89d3842b54fc23ee05b2153
Implements: bp versioned-notification-transformation-pike
This patch adds notifications when instance
tags changed, as tag is commonly used for
searching and filtering, and projects like
searchlight depends on the notifications.
To avoid unnecessarily building a notification
payload when notifications are disabled, this
change also adds the if_notifications_enabled
decorator to send_instance_update_notification.
Change-Id: I03c8e8225e51fd80580772752c0b292987e34218
Implements: bp send-tag-notification
Before this patch, VM diagnostics response was just a
'blob' of data returned by each hypervisor. New API
version makes diagnostics response standardized.
New response has a set of fields which each hypervisor
will try to fill. If hypervisor unable to provide a
specific field then this field will be reported as 'None'.
Tempest tests: I7757c5beeea3d3b0bc15a51cafc5ea2ada65e76c
DocImpact: admin guide docs should be updated to mention
standardized version of the diagnostics response
blueprint: restore-vm-diagnostics
Change-Id: If0b1493cc5c1c7f0d9896dd68342ad4dea4f7da2
Add a new microversion to change the flavor field in the server
details to display a subset of the flavor information instead of
just a link to the original flavor.
This is more reliable since it shows the actual instance size, while
the flavor may have been deleted/recreated in the meantime or the
flavor extra-specs may have been modified.
Implements: blueprint instance-flavor-api
Change-Id: If646149efb7eec8c90bf7d07c39ff4c495349941
We support flavor extra_specs, so it would probably make sense to
have some in one of the test fixture flavors.
In order to make it compatible with the functional tests we'll make
it as small as m1.tiny.
Change-Id: Ic98d7dd2f44796279e18083a8c423aed0066d177
block_device_mapping.rst had bad ref link and i think with
oslosphinx 4.13 or Sphinx 1.6.2, it started throwing error.
This commit fix this.
Change-Id: Ia279fd93609664efcdb5038a50460d54dd14f254
New objects are children of NovaObject class. Such parent
will give us a good control of objects versioning. Also it
will force contributors to dump objects version in case of
any changes. These objects will be used to transmit data
via RPC. Old objects were used only for storing data.
During RPC transmission they are transform into dictionaries.
It is not right approach because we will have some problems
in case of adding new diagnostics fields.
Version of compute RPC was bumped.
Also some changes were made in libvirt driver method
get_instance_diagnostics(). These changes were made to fill
new fields of 'Diagnostics' object.
Implementation of method get_instance_diagnostics()
for other virt drivers will be changed in future patches.
blueprint: restore-vm-diagnostics
Change-Id: I5e2d116df045f803c654f7810b939b5fc859cfbf
This deprecates the TypeAffinityFilter. This filter, which
is really an anti-affinity filter for flavors, attempts to
ensure that no two flavors show up on the same host. However,
to do this it relies on the flavors.id primary key, which is
subject to "change" if/when the admin deletes and recreates a
flavor (this is how Horizon allows you to 'edit' a flavor).
When you do that, you have a new flavor with a new id primary
key and the filter will not know the difference. So you could
really end up with more than one m1.large instance on the
same host, which defeats the purpose of the filter.
This filter is also problematic for
blueprint put-host-manager-instance-info-on-a-diet because in
that blueprint we want to stop sending full instance objects
over RPC from all compute services to the scheduler just to
track affinity and anti-affinity. All we really need for the
ServerGroupAffinityFilter and ServerGroupAntiAffinityFilter
is the list of instance uuids on a host, not the full object.
If we can get rid of TypeAffinityFilter, we can change the
compute<>scheduler RPC calls to just pass the list of instance
uuids for update_instance_info rather than sending an InstanceList.
Change-Id: I660e0316b11afcad65c0fe7bd167ddcec9239a8b
In order to support cross project request_id tracking, we need to be
on oslo.middleware for request_id. This makes that change now that
oslo middleware can support compat headers.
api-ref is not updated yet because x-compute-request-id was apparently
never documented there, and the timing on landing this is narrow
because the moment a requirements update happens we'll have this new
behavior.
Part of bp:oslo-middleware-request-id
Change-Id: I4d9f91b01de12cd0a676fc649953f98473b6b416
This adds a --strict option that can be passed in when calling the
nova-manage cell_v2 discover_hosts command. When this option is used,
the command will only return success if a new host has been found.
In any other case it is considered a failure.
Closes-Bug: #1692982
Change-Id: I942af11a3987e1edce67423c66931ad9ece65587
This came up in IRC where someone upgraded from newton to
ocata and didn't use the simple_cell_setup command, but they
didn't run the map_instances command. Our cells v2 deploy/upgrade
guide mentions using simple_cell_setup for the minimal scenario
so it wasn't clear that they needed to run map_instances.
The install guide doesn't mention any of this either since this
is about upgrades, and the install guide is focused on fresh installs
where there are no existing instances to map.
Change-Id: Iedf3aabf1508abf59a54071b20a7f1c58b63e32c
There is a cells cache in the API and in the request context,
which is used in the controller services (api, conductor, and
scheduler), so this adds a FAQ item about needing to restart
those services if you update the db connection or transport url
in a given cell which is already cached.
Change-Id: I56daf87dad9e86f747e945f0842344ddba42b91e
We get random questions about cells v2 in IRC and some of them
are repeats, and some are just good questions which took some
thought to answer, so we should document those so they aren't
lost.
This is the start of a series, so it adds an initial question.
Change-Id: I96005d1b86bb92f71a5cc848afd2d0126dd9071a
We've had a couple of nice presentations on cells v2
from previous summits. This change links those into the
top-level cells v2 docs in the devref. Note that I
consciously put them before the Manifesto section as
that might be somewhat dated at this point, but it would
also be nice as someone new to watch a presentation before
digging into prose for the details. I also elected to avoid
adding yet a third "References" section to this page since
the other ones are specifically references for install and
upgrade scenarios.
Change-Id: I8e60e018cd103e18dd34c3f9cbdd409ec6550a97
* Example for the rebuild action
The functional test is modified and
the example is replaced with v2.26 examples.
* Example for the rescue action
The example in API reference is replaced with
the example with 'rescue_imgae_ref'.
Parameters for the rebuild action and the rescue action
are also fixed.
The patch completes the parameter verification and
the example verification of servers-actions.inc.
Change-Id: Iaf8808b13d1fdfead50da4cd447b3893578f76dd
Implements: blueprint api-ref-in-rst-pike
These aren't maintained and their usefulness is questionable, given the
availability of logs in '/var/log/' and the plethora of powerful tools
(Logstash) that can be used to parse these logs in large deployments.
Change-Id: I685512a17b8aea700fadf167571f37ecf1874861
Most of these operations can be accomplished using the REST API [1],
with the 'quota_usage_refresh' command being the sole exception. This
particular command is duplicated in a new category - quota - thus
allowing us to fully deprecate the entire 'project' and 'account'
categories.
Note that the '(project|account) quota_usage_refresh' command has been
named 'quota refresh' and not 'quota usage_refresh'. This is because
cliff, which will be used by 'nova-manage' in the future, does not
support underscores in command names.
[1] https://developer.openstack.org/api-ref/compute/#quota-sets-os-quota-sets
Change-Id: Ic02a96802d2a38ed9c4e00991a6bd2088dfcffc6
Cinder deprecated the GlusterFS volume driver
in Newton and deleted it in Ocata:
I10c576602dd0e65947d1a1af5d04b8ada54f4625
Since it's unused, unmaintained and unsupported in
Cinder we should remove it from the libvirt driver.
This also removes the related configuration options.
A note is left in the code since I'm unsure if anything
relies on checking for the netfs disk source_protocol which
was added at the same time as the glusterfs support in
Ic6dd861b40b692b25df67c9d5b63fd436c690fde.
Change-Id: I2745f5578646ec994b53f6b5c0a5f62637b0948a
The nova-network has been deprecated since Newton.
In neutron case, a network ID is a UUID.
So replace an integer network ID with a UUID
in the addFixedIp action example.
The format of removeFixedIp action example
is fixed.
Change-Id: Icaaf25e7648a75b66f6fcaddd759fdf243810db4
Implements: blueprint api-ref-in-rst-pike
Add a functional test for 'removeFloatingIp' action.
Rename the example file for 'addFloatingIp' action
to clarify that it is a request body example.
Change-Id: Ic865318fa640eb17d1317fb3d5f064788ebf44e7
The current docs on the Filter Scheduler imply that filters can be
specified per request. This is not the case, so this change corrects
that page to remove this incorrect language, and make clear that only
the filters specified in the config file will be used.
Closes-Bug: #1689339
Change-Id: I3459a894481cab7d3961ef875015e2b8011e9a58
Now that the services table has a uuid field and we'll be exposing
that out of the REST API, we should include the uuid in the
service.update notification payload.
Part of blueprint service-hyper-uuid-in-api
Change-Id: I8c400086a8dce9317a39f7e65c8d098d93af335d