Commit Graph

62021 Commits

Author SHA1 Message Date
Stephen Finucane 93cc62fb50 tests: Add missing test coverage
Spotted previously.

Change-Id: Iebc6a6526519cedf55ed72d43c712ab5673b0b62
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:26 +00:00
Stephen Finucane 36cd19b168 api: Add runtime check for query additionalProperties
We also fix some types.

Change-Id: Ie1bf7b55f21cafdd311b1c58018a4c815cf7cc65
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:26 +00:00
Stephen Finucane 405948b06d tests: Fix typo
Change-Id: I742914a1c9027aaf1f1c6f6b5c4b1b6c07ccf69e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:26 +00:00
Stephen Finucane da0482aad8 api: Deprecate os-volumes_boot API
If > 2.103, return a HTTP 404 (Not Found). Otherwise, proxy through to
the ServersController.

Change-Id: Ic6b487316bb1fbf2cf57de5d8e6aabf06f0cdf52
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:26 +00:00
Stephen Finucane 52e8a5ad71 api: Remove unnecessary action method prefix
None of the other controllers do this. Don't do it here either. This is
mostly a bulk rename, with the exception of the combination of the
'_action_resize' and '_resize' methods, which were unnecessarily
separated, and the move of the 'delete' method to be next to the
'_delete' inner method.

Change-Id: I87381c6721e7a040c82f8124523116a1d4e2c684
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:26 +00:00
Stephen Finucane 3e4c57479a docs: Update REST API version history for 2.102
Change-Id: Idd647fc90c95b99377212bdbfafcae782d3f845d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:26 +00:00
Stephen Finucane 9c8d51fa0c api: Restrict additional query string arguments
All APIs except the root version APIs now use strict query string
parsing. A test is added to ensure same.

A couple of tests need to be updated since they were using the wrong
path: while the path is ignored when calling the controllers directly,
the query strings are not.

Change-Id: I6dcb5b8f1f865df8f6b17cd7f0d730c3bdff241e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:26 +00:00
Stephen Finucane b95a2c5219 api: Remove dead fields from flavors response
Change-Id: I65be4f2e522c9f73a28b8837d7937a371d3e73d3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 21:39:10 +00:00
Stephen Finucane e73a0bc84b api: Add ability to filter flavors by name
Change-Id: I0d51d29339d1380b93ccb1501e33891082f930ec
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-26 20:23:15 +00:00
Zuul 889e3d83f6 Merge "Attaching a volume returns HTTP 202" 2026-02-26 20:04:37 +00:00
Zuul 0075e102f1 Merge "Add operator document for graceful shutdown" 2026-02-26 17:46:44 +00:00
Zuul 4afab5b505 Merge "Add more test for graceful shutdown" 2026-02-26 17:46:26 +00:00
Zuul f5579e9ccc Merge "Prepare resize/cold migration for graceful shutdown" 2026-02-26 17:45:45 +00:00
Zuul 44a7c5c2b0 Merge "Use 2nd RPC server in compute operations" 2026-02-26 17:44:59 +00:00
Zuul fbfc44f73b Merge "Run nova-compute in native threading mode" 2026-02-26 17:44:44 +00:00
Zuul d55f0ce38d Merge "[compute]Use single long task executor" 2026-02-26 16:59:48 +00:00
Zuul 6ae5459351 Merge "Deprecate unlimited compute actions" 2026-02-26 16:59:31 +00:00
Zuul 84046d1e3f Merge "api: Simplify API version check for flavor description" 2026-02-26 16:20:54 +00:00
Zuul c1a7c81e5d Merge "tests: Clean up flavors tests" 2026-02-26 15:54:30 +00:00
Zuul ddd6067ad5 Merge "db: Move regex helpers to utils" 2026-02-26 15:54:11 +00:00
Zuul 4b38430609 Merge "libvirt: Remove unnecessary arg" 2026-02-26 13:49:24 +00:00
Zuul 0e6505d3b3 Merge "api: Add runtime check for general additionalProperties" 2026-02-26 13:26:25 +00:00
Zuul 14ccb04330 Merge "api: Fix issue with instance usage audit log schema" 2026-02-26 13:26:09 +00:00
Zuul 18a7dcb6e8 Merge "tests: Invert validation check" 2026-02-26 08:50:37 +00:00
Zuul df75b7c13b Merge "api: Add response body schemas for server shares APIs" 2026-02-26 08:50:24 +00:00
Zuul 42ac2df1f8 Merge "api: Add response body schemas for servers APIs (6/6)" 2026-02-26 03:00:09 +00:00
Ghanshyam Maan a877e0ed15 Add operator document for graceful shutdown
Partial implement blueprint nova-services-graceful-shutdown-part1

Change-Id: I18bdb4b9ca2663b5fa1f88b715d27411827b1c45
Signed-off-by: Ghanshyam Maan <gmaan.os14@gmail.com>
2026-02-26 01:33:03 +00:00
Zuul afac8df46d Merge "api: Add response body schemas for servers APIs (5/6)" 2026-02-25 21:00:49 +00:00
Ghanshyam Maan b47d217ca7 Add more test for graceful shutdown
Adding more tests for graceful shutdown:
- shutdown the destination compute and see how live and cold migration
progress
- start build instance and ocne comoute start building instance then
shutdown the comoute service and see if build instance finish or not.
- revert resize server

Partial implement blueprint nova-services-graceful-shutdown-part1

Change-Id: I57132fb7b7fa614dfc138508581ff5a67aaed906
Signed-off-by: Ghanshyam Maan <gmaan.os14@gmail.com>
2026-02-25 20:46:24 +00:00
Ghanshyam Maan 996c4ff9e8 Prepare resize/cold migration for graceful shutdown
During graceful shutdown, compute service keep a 2nd RPC
server active which can be used to finish the in-progress
operations. Like live migration, resize and cold migrations
also perform RPC call among source and destination compute.
For those operation also, we can use 2nd RPC server and make
sure they will be completed during graceful shutdown.

A quick overview of what all RPC methods are involved in the
resize/cold migration and what all will be using 2nd RPC server:

Resize/cold migration
- prep_resize: No, resize/migration is not started yet.
- resize_instance: Yes, here the resize/migration starts.
- finish_resize: Yes
- cross cell resize case:
  - prep_snapshot_based_resize_at_dest: NO, this is initial check and
    migration is not started
  - prep_snapshot_based_resize_at_source: Yes, this start the migration

Confirm resize: NO
- confirm_resize: NO
- cross cell confirm resize case:
  - confirm_snapshot_based_resize - NO

Revert resize:
- revert_resize - NO
- check_instance_shared_storage: YES. This is called from dest to source
  so we need source to respond to it so that revert can continue.
- finish_revert_resize on source- YES, at this stage, revert resize is
  in progress and abandoning it here can lead migration to unreocverable
  state.
- cross cell revert case:
  - revert_snapshot_based_resize_at_dest: NO
  - finish_revert_snapshot_based_resize_at_source: YES

Partial implement blueprint nova-services-graceful-shutdown-part1

Change-Id: If08b698d012a75b587144501d829403ec616f685
Signed-off-by: Ghanshyam Maan <gmaan.os14@gmail.com>
2026-02-25 20:36:07 +00:00
Ghanshyam Maan d5ffb58a8d Use 2nd RPC server in compute operations
For graceful shutdown of compute service, it will have two RPC servers.
One RPC server is used for the new requests which will be stopped during
graceful shutdown and 2nd RPC server (listen on 'compute-alt' topic)
will be used to complete the in-progress operations.

We select the operations (case by case) and their RPC method to use
the 2nd PRC server so that they will not be interupted on shutdown
initiative and graceful shutdown time will keep 2nd RPC server active
for graceful_shutdown_timeout. A new method 'prepare_for_alt_rpcserver'
is added which will fallback to first RPC server if it detect the old
compute.

As this is upgrade impact, it bumps the compute/service version, adds
releasenotes for the same.

The list of operations who should use the 2nd RPC server will grow
evanutally and this commit moves the below operations to use the 2nd
RPC server:

* Live migration

  - Live migration: It use 2nd RPC servers and will try to complete
    the operation during shutdown.
  - live_migration_force_complete does not need to use 2nd RPC server.
    It is direct RPC request from API to compute and if that is
    rejected during shutdown, it is fine and can be initiated again
    once compute is up.
  - live_migration_abort does not need to use 2nd RPC server. Ditto,
    it is direct RPC request from API to compute. It cancel the queue
    live migration but if migration is already started, then driver
    cancel the migration. If it is rejected during shutdown because of
    RPC is stopped, it is fine and can be initiated again.

* server external event
* Get server console

As graceful shutdown cannot be tested in tempest, this adds a new job
to test it. Currently it test the live migration operation which can
be extended to other operations who will use 2nd RPC server.

Partial implement blueprint nova-services-graceful-shutdown-part1

Change-Id: I4de3afbcfaefbed909a29a831ac18060c4a73246
Signed-off-by: Ghanshyam Maan <gmaan.os14@gmail.com>
2026-02-25 20:32:44 +00:00
Zuul 37a9596eb1 Merge "libvirt: Use firmware auto-selection by libvirt" 2026-02-25 18:13:09 +00:00
Zuul 4c32ea65e3 Merge "libvirt: Add capability to load smm feature from existing xml" 2026-02-25 17:47:46 +00:00
Stephen Finucane ed83dab5a7 api: Simplify API version check for flavor description
Unlike the check for extra specs, the check for whether to include a
description field or not is driven entirely by API version rather than
API version and policy. We can therefore move the checks inside the
functions that generate the response rather than duplicating them
elsewhere.

Change-Id: I86aa4e1c62a0b0e6fa4d27e559d3197fb73851ba
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-25 14:16:36 +00:00
Stephen Finucane 61c1ce6c8e tests: Clean up flavors tests
Ahead of adding additional tests. We do the following:

* Move the controller to an instance attribute rather than a class
  attribute
* Modify tests so they all call controller methods directly rather than
  setting up a fake router (this is the cause of the largest changes)
* Remove unnecessary aliasing of exceptions
* Remove unnecessary setUp arguments
* Split a test into multiple tests
* Standardize test class names

Change-Id: I2cac4cc79288f7b3bacc4a63a1d36d4cf12013d7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-25 14:16:36 +00:00
Stephen Finucane d79132d113 db: Move regex helpers to utils
So that we can use them for API DB methods, which are found in
nova.objects instead of nova.db.

Change-Id: Ifb15ee90ac6a6400b7268ed80f727080e98c4cdf
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-25 14:16:36 +00:00
Stephen Finucane a5bde25463 api: Add runtime check for general additionalProperties
Change-Id: I959afd6e6fa89f0656c10599e50ecb179c87d354
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-25 14:12:14 +00:00
Stephen Finucane 0c4c0d8ce8 api: Fix issue with instance usage audit log schema
We need another level of nesting [1].

[1] https://groups.google.com/g/json-schema/c/pK_Y1Gb5waM

Change-Id: I9828e287208a0dff8f909036df848f7539c534d4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2026-02-25 13:48:11 +00:00
Zuul ebb3175d9c Merge "tests: Fix bound" 2026-02-25 00:17:42 +00:00
Zuul c26c66afb3 Merge "api: Add response body schemas for servers APIs (4/6)" 2026-02-24 23:57:17 +00:00
Zuul 983fbc683b Merge "api: Add response body schemas for servers APIs (3/6)" 2026-02-24 23:57:05 +00:00
Zuul 7dd7a0ffe3 Merge "api: Add response body schemas for servers APIs (2/6)" 2026-02-24 23:45:11 +00:00
Zuul 02d083650b Merge "api: Add response body schemas for servers APIs (1/6)" 2026-02-24 23:44:56 +00:00
Zuul 9855b5c8cc Merge "libvirt: Add capability to load loader and nvram from xml" 2026-02-24 20:12:05 +00:00
Zuul adbea93431 Merge "libvirt: Add basic xml generation for firmware auto selection" 2026-02-24 20:11:42 +00:00
Zuul 04e926a38e Merge "libvirt: Extend functional test coverage of UEFI boot guests" 2026-02-24 19:14:59 +00:00
Zuul 5ed052061a Merge "Fix the negative sleep value in graceful_shutdown()" 2026-02-24 19:14:06 +00:00
Zuul 05a539ace9 Merge "Fix for bug 2140537" 2026-02-24 18:23:50 +00:00
Zuul 12ee1cd80d Merge "Add manager graceful shutdown, timeout, and wait" 2026-02-24 17:58:27 +00:00
Balazs Gibizer 4bce4480b9 Run nova-compute in native threading mode
Previous patches removed direct eventlet usage from nova-compute so
now we can run it with native threading as well. This patch documents
the possibility and switches both nova-compute processes to native
threading mode in the nova-next job.

Change-Id: I7bb29c627326892d1cf628bbf57efbaedda12f1a
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
2026-02-24 16:28:06 +01:00