Commit Graph

61264 Commits

Author SHA1 Message Date
melanie witt eb3a803cd7 unified limits: discover service ID and region ID
In oslo.limit 2.6.0 service endpoint discovery was added, provided by
three new config options:

  [oslo_limit]
  endpoint_service_type = ...
  endpoint_service_name = ...
  endpoint_region_name = ...

We can use the same config options if they are present to lookup the
service ID and region ID we need when calling the
GET /registered_limits API as part of the resource limit enforcement
strategy. This way, the user will not have to configure endpoint_id.

This will look for [oslo.limit]endpoint_id first and if it is not set,
it will do the discovery.

Closes-Bug: #1931875

Change-Id: Ida14303115e00a1460e6bef4b6d25fc68f343a4e
2025-03-07 17:18:30 -08:00
Zuul 29d17552a7 Merge "Add live_migratable flag to PCI device specification" 2025-03-04 20:24:52 +00:00
Zuul e1b33cdf0c Merge "Augment the LiveMigrateData object" 2025-03-04 20:24:46 +00:00
Stephen Finucane 244ff89060 tests: Filter out eventlet deprecation warnings
These are *super* annoying (and useless to boot, since there is nothing
we can do about them in the near term). Shut them ⬇️⬇️⬇️ down ⬇️⬇️⬇️.

Change-Id: I469dafa243b95749b34503c1f3e905d9d8c780d4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-04 15:44:44 +00:00
Zuul 406eedb1ce Merge "Fix microversion 2.98 doc/tests for update/rebuild APIs" 2025-03-04 01:45:13 +00:00
Zuul cf326d4375 Merge "Fix microversion 2.96 for update/rebuild APIs" 2025-03-04 01:38:24 +00:00
René Ribaud f9c5f50376 Add live_migratable flag to PCI device specification
The target goal of these series of patch is to enable VFIO devices
migration with kernel variant drivers.

Partially-Implements: blueprint migrate-vfio-devices-using-kernel-variant-drivers
Change-Id: I23af0d36448e9b659f6383d602d9dfa0e2798e60
2025-03-02 21:37:47 +01:00
René Ribaud 07f54bfced Augment the LiveMigrateData object
Adds the field ``pci_dev_map_src_dst`` to ``LiveMigrateData`` object
to include the PCI device mapping between the source and destination
device addresses.

The target goal of these series of patch is to enable VFIO devices
migration with kernel variant drivers.

Partially-Implements: blueprint migrate-vfio-devices-using-kernel-variant-drivers
Depends-On: https://review.opendev.org/c/openstack/nova/+/938405
Change-Id: I1c8e5709640abedb332d96c2c1f5268fa239d9a1
2025-03-02 21:37:47 +01:00
René Ribaud 03915cd59d Update driver to deal with managed flag
The target goal of these series of patch is to enable VFIO devices
with kernel variant drivers.

Implements: blueprint enable-vfio-devices-with-kernel-variant-drivers
Change-Id: I7949ba6da8b6257865d8e9e48bf3feabc10bdf17
2025-03-02 21:37:47 +01:00
Zuul e6b8b051a9 Merge "libvirt: Add new option to enforce multipath volume connections" 2025-03-01 14:09:09 +00:00
Ghanshyam Mann 7a00971b8f Fix microversion 2.98 doc/tests for update/rebuild APIs
microversion 2.98 changed the GET and GET list details
API response to expand the image field
- https://review.opendev.org/c/openstack/nova/+/939649

but when we change the views/servers.py then update server
and rebuild server API response also gets updated.
- https://review.opendev.org/c/openstack/nova/+/939649/12/nova/api/openstack/compute/views/servers.py#595

The microversion change actually changed the response for
the update and rebuild API but did not update the documentation
about this change. Neither added test for rebuild and update
which verify the response change.

Since microversion 2.75, we have made all these 4 APIs response
consistent.

Implements: blueprint image-properties-in-server-show

Change-Id: Ifc2edc59c601391a31fd8953c742969e5b368767
2025-02-28 17:13:59 +00:00
Ghanshyam Mann f9e89bc0d1 Fix microversion 2.96 for update/rebuild APIs
microversion 2.96 changed the GET and GET list details
APi response to add a new field 'pinned_availability_zone'
- https://review.opendev.org/c/openstack/nova/+/904568

but when we change the views/servers.py then update server
and rebuild server API response also gets updated.
- https://review.opendev.org/c/openstack/nova/+/904568/17/nova/api/openstack/compute/views/servers.py#309

The microversion change actually changed the response for
the update and rebuild API but did not update the documentation
about this change. Neither added test for rebuild and update
which verify the response change.

Since microversion 2.75, we have made all these 4 APIs response
consistent.

Change-Id: I31fbb3c5e689302713bfb7a254c5d0cc12de2dc4
2025-02-28 17:06:18 +00:00
Zuul a933c7fbab Merge "Add support for showing scheduler_hints in server details" 2025-02-28 02:14:07 +00:00
Zuul d9d34aa0e6 Merge "Add managed flag to PCI device specification" 2025-02-28 01:43:20 +00:00
Zuul 97dad74476 Merge "Correctly patch get_by_flavor_id" 2025-02-28 01:43:10 +00:00
Zuul 330458f2de Merge "Replace oslo_utils.encodeutils.exception_to_unicode" 2025-02-28 01:43:02 +00:00
Zuul ef1585f9d7 Merge "Switch to using oslo.utils secretutils" 2025-02-28 01:42:53 +00:00
Takashi Kajinami 4aab14a09f libvirt: Add new option to enforce multipath volume connections
Currently, even when [libvirt] volume_use_multipath is set to True,
volume attachment silently falls back to single path if multipathd is
not running in the host. This sometimes prevents operators from
noticing the misconfiguration, until they face any issue caused by
missing redundancy.

Introduce the new [libvirt] volume_enforce_multipath option, which
makes the attachment process fail if multipathd is not running.
A similar parameter (enforce_multipath_for_image_xfer) was already
implemented in cinder and this change follows how the parameter is
implemented there.

Also add the check in init phase to detect lack of mulitipath daemon
during initializing driver.

Min version of os-brick has to be bumped due to the interface change
made by 8d919696a9f1b1361f00aac7032647b5e1656082 .

Implements: blueprint enforce-multipath
Change-Id: I828de70ca7b343a4562ace4049d2b3857dbf900a
2025-02-28 08:52:25 +09:00
Zuul 4fdbbb6a91 Merge "doc: Use dnf instead of yum" 2025-02-27 23:06:26 +00:00
Zuul 42b9b3faa5 Merge "Drop environment for Python 3.8" 2025-02-27 20:23:53 +00:00
Douglas Viroel 2db8af71dd Add support for showing scheduler_hints in server details
Nova currently lacks a straightforward way to expose scheduler hints
associated with a server. This change extends existing Nova's
API to allow users to retrieve this information when it is available.
It adds a new API microversion to support returning the associated
scheduler_hints in ``GET /servers/{server_id}``, `GET /servers/detail``,
``PUT /servers/{server_id}`` and ``POST /server/{server_id}/action``
(rebuild) responses.

Implements: blueprint show-scheduler-hints-in-server-details
Change-Id: If0070cfbc218e0515bf3b58fc8c5067ae22c7072
2025-02-26 17:50:25 -03:00
Zuul 8f57fa7359 Merge "Fix detaching devices by alias with mdevs" 2025-02-26 10:38:36 +00:00
Zuul d660e4e6fd Merge "Add repoducer test for bug 2074219" 2025-02-26 08:50:32 +00:00
Zuul 2ca87d5383 Merge "Fix device type when booting from ISO image" 2025-02-26 01:24:45 +00:00
Zuul 8de6a43a43 Merge "Per-Property ImageMetaPropsWeigher" 2025-02-25 19:16:49 +00:00
René Ribaud 12905dade3 Add managed flag to PCI device specification
The target goal of these series of patch is to enable VFIO devices
with kernel variant drivers.

Implements: blueprint enable-vfio-devices-with-kernel-variant-drivers
Change-Id: Iea3efa29b6b89639b21d3e701f8710d0043d00c7
2025-02-25 15:54:14 +01:00
Zuul d9f72b2432 Merge "libvirt: allow direct SPICE connections to qemu" 2025-02-25 03:23:01 +00:00
Zuul 120495ca56 Merge "libvirt: direct SPICE console database changes" 2025-02-25 01:26:13 +00:00
Zuul a5f43db9a9 Merge "libvirt: direct SPICE console object changes" 2025-02-25 00:35:04 +00:00
Zuul 4611973c99 Merge "libvirt: Fix regression of listDevices() return type" 2025-02-24 23:25:54 +00:00
Zuul d25de45a4b Merge "Reproducer for bug 2098892" 2025-02-24 21:25:48 +00:00
Michael Still cbc263f6bc libvirt: allow direct SPICE connections to qemu
This patch adds a new console type, "spice-direct", which provides
the connection information required to talk the native SPICE protocol
directly to qemu on the hypervisor. This is intended to be fronted
by a proxy which will handle authentication separately.

A new microversion is introduced which adds the type "spice-direct"
to the existing "spice" protocol.

An example request:

POST /servers/<uuid>/remote-consoles
{
  "remote_console": {
    "protocol": "spice",
    "type": "spice-direct"
  }
}

An example response:

{
  "remote_console": {
    "protocol": "spice",
    "type": "spice-direct",
    "url": "http://localhost:13200/nova?token=XXX";
  }
}

This token can then be used to lookup connection details for the
console using a request like this:

GET /os-console-auth-tokens/<consoletoken>

Which returns something like this:

{
  "console": {
    "instance_uuid": <uuid>,
    "host": <hypervisor>,
    "port": <a TCP port number>,
    "tls_port": <another TCP port number>,
    "internal_access_path": null
  }
}

APIImpact

Change-Id: I1e701cbabc0e2c435685e31465159eec09e3b1a0
2025-02-22 08:25:38 +11:00
Michael Still d8e95078cd libvirt: direct SPICE console database changes
This patch makes just the schema changes required for the
implementation of SPICE direct consoles, as requested during
review. See change I1e701cbabc0e2c435685e31465159eec09e3b1a0
for the related feature implementation.

APIImpact

Change-Id: I838ad1a8a74f47544226d3da0e7f1a2f5585b7cb
2025-02-22 08:25:37 +11:00
Michael Still 253dfc76eb libvirt: direct SPICE console object changes
This patch changes just the objects required for the implementation
of SPICE direct consoles, as requested during review. See change
I1e701cbabc0e2c435685e31465159eec09e3b1a0 for the related feature
implementation.

APIImpact

Change-Id: I8ec513fd818362d2f041c679a84e900952af61a2
2025-02-22 08:25:37 +11:00
melanie witt 2c07aa0645 libvirt: Fix regression of listDevices() return type
This a partial revert of change
I60d6f04d374e9ede5895a43b7a75e955b0fea3c5 which added tpool.Proxy
wrapping to the listDevices() and listAllDevices() methods.

The regression was caught during downstream testing with vGPUs and the
update_available_resource() periodic task was failing with:

  TypeError: virNodeDeviceLookupByName() argument 2 must be str or
    None, not Proxy

It turns out that while the listAllDevices() method returns a list of
virNodeDevice objects [1], the listDevices() method returns a list of
string names [2] and is generated from the corresponding function in C
[3].

The error was not caught by unit or functional testing because those
test environments intentionally do not import the libvirt Python
module -- so mocked code in the LibvirtFixture runs instead. Also, the
update_available_resource() method has a 'except Exception:' at the end
which logs an error but does not re-raise. So it would not cause a
functional test to fail.

This reverts the change that caused the regression, updates potentially
confusing docstrings, adds type annotations to the methods that use
listDevices(), and moves the nodeDeviceLookupByName type checking into
the LibvirtFixture.

Closes-Bug: #2098892

[1] https://github.com/libvirt/libvirt-python/blob/408815a/libvirt-override-virConnect.py#L520-L524
[2] https://github.com/libvirt/libvirt-python/blob/408815a/libvirt-override-api.xml#L448-L453
[3] https://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeListDevices

Change-Id: Ib5befdd3c13367daa208ff969f66cba693ae2c76
2025-02-20 22:42:16 +00:00
melanie witt 3cf6667c50 Reproducer for bug 2098892
Change I60d6f04d374e9ede5895a43b7a75e955b0fea3c5 added tpool.Proxy
wrapping to the listDevices() and listAllDevices() methods but
introduced a regression for listDevices() that led to an error in
update_available_resource():

  TypeError: virNodeDeviceLookupByName() argument 2 must be str or
    None, not Proxy

The error was not caught by unit or functional testing because those
test environments intentionally do not import the libvirt Python
module -- so mocked code in the LibvirtFixture runs instead. Also, the
update_available_resource() method has a 'except Exception:' at the end
which logs an error but does not re-raise. So it would not cause a
functional test to fail.

This adds a functional test to reproduce the bug and adds a keyword arg
to the test _run_periodics() method to specify whether it should raise
an exception if an error is logged.

Related-Bug: #2098892

Change-Id: I3a3dda57f2181b24bd6589ac7bb8160014ab2396
2025-02-20 22:31:21 +00:00
Zuul 375d95565d Merge "FUP for reno issues" 2025-02-20 20:16:45 +00:00
Zuul d00a4d4f0f Merge "move nova-ovs-hybrid-plug to deploy with spice and fix qxl default" 2025-02-20 20:16:38 +00:00
Zuul 43eaed3016 Merge "Add a new ImagePropertiesWeigher" 2025-02-20 18:02:27 +00:00
Sean Mooney 08cbf0f4b1 FUP for reno issues
this change addresses nits in the
make-virtio-the-default-spice-video releasenote

Change-Id: I1d8782cf91375b88c1c119ef4de8a9868b7a60f1
2025-02-20 17:43:13 +00:00
Zuul f97505f9d2 Merge "Add fill_metadata() to InstanceList" 2025-02-20 17:35:03 +00:00
Sylvain Bauza 7388362f28 Per-Property ImageMetaPropsWeigher
Add a new config option that will only check specific properties
and allow per-property weights.

Change-Id: Iae51558b9eb03da705e0da939cbd459b4d3b51f7
2025-02-20 03:00:03 +00:00
Sylvain Bauza acd6c733c6 Add a new ImagePropertiesWeigher
This weigher will check how many instances in the host have the image
properties that are requested and will prefer by default to pack
instances with the same properties.

Implements blueprint: image-metadata-props-weigher

Change-Id: I3bfed44bd089c6b226d13c3ac4a0003411737cbd
2025-02-20 02:49:08 +00:00
Sean Mooney d4f40976d0 move nova-ovs-hybrid-plug to deploy with spice and fix qxl default
In centos/rhel 9 qemu supprot for the qxl model was removed
with the removal of spice support.
In ubuntu 24.04 qemu support for qxl and spice supprot
has now also been removed.
debian 12 bookworm still support spice in there qemu package.

When we updated the default video model to virtio for x86 we
left a config driven special case for spice to default to qxl
since that nolonger works on centos or ubuntu based distos that
default is not helpful so this change removes the special case
making virtio the default for x86 regardless of the console used.

This change also updates the nova-ovs-hybrid-plug to test with spice
so that we have at least one job using it. to enable that the job is
moved to debian.

Closes-Bug: #2097529
Change-Id: I265ad2ced3729bed41bf53c58dcebadb775ce1f7
2025-02-19 17:09:09 +00:00
Zuul 88a36a5a00 Merge "Respect supplied arguments in novncproxy_base_url" 2025-02-19 16:00:27 +00:00
Dan Smith 420050cf33 Add fill_metadata() to InstanceList
This adds a non-remotable method to InstanceList which will batch-
fill system_metadata for all the instances in the list that are
missing it in as efficient of a manner as possible. This does not
require an object bump because no remotable methods or fields are
changed.

Related to blueprint image-metadata-props-weigher

Change-Id: Icc47de2b677b3d212a7f6faa61a85ea9bff9f412
2025-02-19 07:45:20 -08:00
Zuul ae87118f98 Merge "Add unit test coverage of get_machine_ips" 2025-02-18 10:48:39 +00:00
Zuul b6ceea8e7c Merge "allow discover host to be enabled in multiple schedulers" 2025-02-18 09:38:48 +00:00
Zuul 12bc65f942 Merge "Disable the heal instance info cache periodic task" 2025-02-17 20:46:07 +00:00
Zuul 707967b4ae Merge "Add support for showing image properties in server show response" 2025-02-17 20:45:59 +00:00