Commit Graph

61660 Commits

Author SHA1 Message Date
Takashi Kajinami b7c7d45093 Migrate MEM_ENCRYPTION_CONTEXT from root provider
This is the preparation work to extend memory encryption support to
support AMD SEV-ES, and migrates the MEM_ENCRYPTION_CONTEXT resources
to the separate child resource provider, so that slots for different
memory encryption mechanism can be modeled.

Partially-Implements: blueprint amd-sev-es-libvirt-support
Change-Id: Iad51c32d0f64ef52513bd2f2b517c91f29c63787
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-27 22:57:25 +09:00
Zuul a7e5377da4 Merge "api: Only apply "soft" additionalProperties validation to requests" 2025-08-27 06:04:36 +00:00
Zuul f5931184e9 Merge "tests: Use valid UUIDs for cinder resources" 2025-08-27 05:36:22 +00:00
Zuul 40b4ebc72d Merge "api: Separate volume, snapshot and volume attachments" 2025-08-27 05:36:00 +00:00
Zuul 5ecc54292b Merge "libvirt: Get info with abs path, rebase with rel path" 2025-08-27 04:50:53 +00:00
Zuul 589ecad750 Merge "Remove logic for unsupported old libvirt/qemu" 2025-08-27 04:43:03 +00:00
Sylvain Bauza d6032973ca Update min support for Flamingo
Now that master is on Flamingo, which is a non-SLURP release, we need
to bump our minimum supported version to the previous SLURP release,
which is now Epoxy (and no longer Caracal).

Change-Id: Ia7d0c1bdc9890f3789791fd5bc57101dc128a9e8
Signed-off-by: Sylvain Bauza <sbauza@redhat.com>
2025-08-26 16:52:39 +02:00
Stephen Finucane 1d32b50b4a api: Only apply "soft" additionalProperties validation to requests
Work around an issue with oneOf, noted inline. We also add a new check
in the API microversion handling to always fail microversion checks in a
legacy API request context. Without this, we see failures due to tests
that set microversion headers *and* legacy request context.

Change-Id: Ibf2344bcc8c4b1c025f0e665553d09d47e9c29d3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-26 13:54:47 +01:00
Stephen Finucane 2a546a8645 tests: Use valid UUIDs for cinder resources
This necessitates adding some missing return values for various mocks.
Combined, this brings our tests closer to reality and will be needed
once we add response schemas for these.

Change-Id: I1ff23082d257f98e4f63b84b287a3c374a62bf0b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-26 13:54:47 +01:00
Stephen Finucane a8651eaff3 api: Separate volume, snapshot and volume attachments
These all belong in separate files. Make it so.

We also rename the volume_attachment schema file to volume_attachments,
to better link it to the actual API code, and tweak an error message to
fix some capitalization.

Change-Id: Iffefc263bbf19d18137207c0432c16fdb3c513f9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-26 13:54:43 +01:00
Stephen Finucane 2e666e768a api: Address issues with images APIs
Populate missing 'required' values.

Change-Id: I4e1e00c3f7d4f2a581db42dae3535a5931e8f1cc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-21 16:09:06 +01:00
Stephen Finucane 4119634bf1 api: Fix validators for hw:cpu_max_* extra specs
We also fix a typo.

Change-Id: I38d03a860ccef6d1efb19b3c465411a352bb7971
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2120862
2025-08-21 14:12:49 +01:00
Zuul d5cfdfd16d Merge "[tests] Add printing of sample and template paths" 2025-08-19 20:15:03 +00:00
Zuul 3dbbe830a4 Merge "only show standard image properties in server show." 2025-08-19 16:39:30 +00:00
Zuul b0900e9185 Merge "restrict swap volume to cinder" 2025-08-19 01:00:41 +00:00
Zuul 64d73d5e79 Merge "api: Deprecate v2 API" 2025-08-18 22:18:54 +00:00
Sean Mooney 93c0f9bc74 restrict swap volume to cinder
This change tightens the validation around the attachment
update API to ensure that it can only be called if the source
volume has a non empty migration status.

That means it will only accept a request to swap the volume if
it is the result of a cinder volume migration.

This change is being made to prevent the instance domain
XML from getting out of sync with the nova BDM records
and cinder connection info. In the future support for direct
swap volume actions can be re-added if and only if the
nova libvirt driver is updated to correctly modify the domain.
The libvirt driver is the only driver that supported this API
outside of a cinder orchestrated swap volume.

By allowing the domain XML and BDMs to get out of sync
if an admin later live-migrates the VM the host path will not be
modified for the destination host. Normally this results in a live
migration failure which often prompts the admin to cold migrate instead.
however if the source device path exists on the destination the migration
will proceed. This can lead to 2 VMs using the same host block device.
At best this will cause a crash or data corruption.
At worst it will allow one guest to access the data of another.

Prior to this change there was an explicit warning in nova API ref
stating that humans should never call this API because it can lead
to this situation. Now it considered a hard error due to the
security implications.

Closes-Bug: #2112187
Depends-on: https://review.opendev.org/c/openstack/tempest/+/957753
Change-Id: I439338bd2f27ccd65a436d18c8cbc9c3127ee612
Signed-off-by: Sean Mooney <work@seanmooney.info>
2025-08-18 16:11:41 +00:00
Zuul e39bac965a Merge "Run nova-api and -metadata in threaded mode" 2025-08-15 11:53:36 +00:00
Zuul edad5fea4f Merge "Drop unused method" 2025-08-15 08:01:24 +00:00
Zuul 62214b4e50 Merge "Run nova-next with n-sch in threading mode" 2025-08-15 04:48:14 +00:00
Balazs Gibizer d6a3f86329 Run nova-api and -metadata in threaded mode
It turns out that nova-api and nova-metadata only depend on spawning
threads via scatter-gather. The scatter-gather already supports both
eventlet and threading mode so we can switch these services.

Our WSGI services (nova-api, nova-metadata) are not relying on
oslo.service to fork worker processes, but expect the web server to
handle that (uwsgi, apache mod_wsgi). This means we don't need to handle
any forking issues as no nova code runs before the fork.

Change-Id: Id3a339c605dfc730bdb7994c3ca45baafeb5af80
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
2025-08-14 13:39:25 +02:00
Zuul e4340cd8e5 Merge "Allow services to start with threading" 2025-08-14 04:27:59 +00:00
Zuul 5976aaff25 Merge "api: Remove '[api] auth_strategy', NoAuthMiddlware" 2025-08-13 22:11:54 +00:00
Zuul 1640b5f735 Merge "api: Remove deprecated pipeline_factory" 2025-08-13 22:11:31 +00:00
Sean Mooney e2adef487e [tests] Add printing of sample and template paths
This commit refactors _verify_response in ApiSampleTestBase
to print the paths to the relevent template or sample on test
failure. It also moves the validation that the sample and template
agree after the verification that the template and response match.

Functionally the test is the same but now it's simpler to read and
debug as there is a cleaner separation between the two phases
of the verification and less state and context
to absorb as a result.

Change-Id: Ifc2552b6c0f7b667d24639d8aa685028120432ec
Signed-off-by: Sean Mooney <work@seanmooney.info>
2025-08-13 21:24:37 +01:00
Sean Mooney c7eac94fc5 only show standard image properties in server show.
nova stopped supporting custom image properties many years
ago with the introduction of ovo.

when the image property show feature was added it incorrectly
filtered the instance_system_metadata table for the image prefix
but didnt restrict the responce to only standard image properties

This change adds that filtering and fixes minor issues with the
responce schema validation.

Related-Bug: #2098384
Change-Id: I11a8783b02f35b7dfc964bf49f1a8a0a2469abc3
Signed-off-by: Sean Mooney <work@seanmooney.info>
2025-08-13 21:24:23 +01:00
Zuul 651afd1b2e Merge "Drop unused parameter type validation method" 2025-08-13 12:45:58 +00:00
Zuul 2909164391 Merge "Migrate ExceptionHelper to test utilities" 2025-08-12 16:11:38 +00:00
Balazs Gibizer 3e33b58092 Run nova-next with n-sch in threading mode
Depends-On: https://review.opendev.org/c/openstack/devstack/+/948436

Change-Id: I36c68740fae3e3a9bd3286a1b66d86fd3341aff5
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
2025-08-12 07:51:02 -07:00
Balazs Gibizer 5cbe39aca9 Allow services to start with threading
At the service startup nova need to initialize either the eventlet or
the threading backend of oslo.service. So this patch reuses the existing
logic behind OS_NOVA_DISABLE_EVENTLET_PATCHING.

When OS_NOVA_DISABLE_EVENTLET_PATCHING env variable is set to true the
service will select the threading backend otherwise the eventlet
backend.

Also to avoid later monkey patch calls to invalidated the selection if
the threading backend is selected then the monkey_patch code is
poisoned.

This patch also makes sure that oslo.messaging also initialized with the
matching executor backend.

As this is the last step to make nova-scheduler run in threading mode
this patch adds a release notes as well.

Change-Id: I6e2e6a43df78d23580b5e7402352a5036100ab36
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
2025-08-12 07:51:01 -07:00
Zuul eb823b8068 Merge "conf: Rename '[api] neutron_default_tenant_id'" 2025-08-12 12:45:25 +00:00
Zuul 78969a1592 Merge "tests: Use v2.1 API in OSAPIFixture" 2025-08-12 11:31:29 +00:00
Zuul e63244f15d Merge "tests: Remove unnecessary API version overrides" 2025-08-12 11:31:16 +00:00
Zuul 38525c6a7f Merge "tests: Update to use '/v2.1' prefix, avoid project ID" 2025-08-12 11:31:04 +00:00
Zuul f65c7301ac Merge "mypy: fix type annotations for PciDevicePoolList and NUMATopologyLimits" 2025-08-12 11:30:51 +00:00
Zuul d9a94eb90a Merge "Fix libvirt metadata upgrade release note" 2025-08-12 09:48:12 +00:00
Takashi Kajinami bda78b5cf2 Remove logic for unsupported old libvirt/qemu
After recent bump by f7d99623ed , nova
requires QEMU >= 6.2.0 and libvirt > 8.0.0 .

Drop all logic added to support QEMU or libvirt older than these lower
boundaries.

Change-Id: Ie27e781f4b2a5696cde4988d9332d2d7e86eeda4
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-12 06:36:29 +00:00
Zuul 04a65154a9 Merge "Remove unused utilities" 2025-08-11 20:14:34 +00:00
Zuul 29220c52b1 Merge "Fix live migration error logging" 2025-08-11 14:35:22 +00:00
Zuul 4e6e73528d Merge "db: Fix api_db_opts reading main_db_opts" 2025-08-11 13:28:26 +00:00
Zuul 0ed7191c4c Merge "Enable E711 consistently" 2025-08-11 13:28:13 +00:00
Zuul e1cb0ba0a6 Merge "sqlalchemy: Use built-in declarative" 2025-08-11 13:28:01 +00:00
Stephen Finucane df630cd1b2 api: Deprecate v2 API
Change-Id: Ie236cc001ddc6362b92119710ec1672ae733318e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-11 12:12:13 +01:00
Stephen Finucane d238306aa6 api: Remove '[api] auth_strategy', NoAuthMiddlware
Also remove associated tests.

Change-Id: I098f1d4b61fabb10c4da3de02f10337b2ad6c544
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-11 12:12:13 +01:00
Stephen Finucane 4baa108c04 api: Remove deprecated pipeline_factory
This has been a no-op since 14.0.0 (Newton) nearly 10 years ago.

Change-Id: I82715afe6a4d6db7505acdd4556776345681d034
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-11 12:12:13 +01:00
Stephen Finucane b2451a74fc conf: Rename '[api] neutron_default_tenant_id'
Neutron has used the term project instead of tenant for a long time now.
Rename the option accordingly and drop deprecated group and deprecated
name aliases from other options in the '[api]' group.

Change-Id: I5a547c7b6232c24b3a0f0c6d0ac916229a91b038
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-11 12:12:13 +01:00
Stephen Finucane c921e5b3bc tests: Use v2.1 API in OSAPIFixture
Default to the microversioned API.

Change-Id: Iebbddae485e0db7e4fda39d60878a23f02994726
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-11 12:12:13 +01:00
Stephen Finucane 0996acc941 tests: Remove unnecessary API version overrides
The default version is v2.1, which is what we want. No need to
override these values.

We also remove a seemingly useless test that is implicitly duplicated by
other tests.

Change-Id: I3e42acf467ecd5ba6af5713a2d22e68698b8f09e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-11 12:12:13 +01:00
Stephen Finucane 3a2169cb59 tests: Update to use '/v2.1' prefix, avoid project ID
This patch looks very big but as the subject suggests it's only
reworking some prefixes (to ensure we're testing the correct version of
the API) and stripping the unnecessary project ID.

Change-Id: If0429d1398f28048178df4117cad8d6d9893f870
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-11 12:12:12 +01:00
Callum Dickinson 660bacebc4 Fix libvirt metadata upgrade release note
Should be using 'upgrade', not 'upgrades'.
This fixes the upgrade note not being shown in the release notes.

Change-Id: I9ba3751988bb5ca2ddd89e8cffbc88d818068e88
Signed-off-by: Callum Dickinson <callum.dickinson@catalystcloud.nz>
2025-08-10 09:49:29 +12:00