Commit Graph

4470 Commits

Author SHA1 Message Date
Zuul f4ca2e3ef9 Merge "Add hw_mem_encryption_model image property" 2025-08-28 21:03:27 +00:00
Takashi Kajinami dc6641baad Add hw_mem_encryption_model image property
This is prep work to support launching instances with AMD SEV-ES memory
encryption and adds the object field to select the CPU feature to
encrypt and protect memory data of instances.

Partially-Implements: blueprint amd-sev-es-libvirt-support
Change-Id: I71fde5438d4e22c9e2566f8a684c5a965a7f3dd3
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-28 08:47:49 +09:00
Ghanshyam Maan f914cb185c Add service role in Nova policy
RBAC community wide goal phase-2[1] is to add 'service'
role for the service APIs policy rule. This commit
defaults the service APIs to 'service' role. This way
service APIs will be allowed for service user only.

Tempest tests also modified to simulate the service-to-service
communication. Tempest tests send the user with service
role to nova API.
- https://review.opendev.org/c/openstack/tempest/+/892639>

Partial implement blueprint policy-service-role-default

[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#phase-2

Change-Id: I1565ea163fa2c8212f71c9ba375654d2aab28330
Signed-off-by: Ghanshyam Maan <gmaan@ghanshyammann.com>
2025-08-27 19:34:04 +00: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
Zuul 3dbbe830a4 Merge "only show standard image properties in server show." 2025-08-19 16:39:30 +00:00
Zuul 64d73d5e79 Merge "api: Deprecate v2 API" 2025-08-18 22:18:54 +00:00
Zuul e39bac965a Merge "Run nova-api and -metadata in threaded mode" 2025-08-15 11:53:36 +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
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
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
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
Zuul 4100d4d8fb Merge "Document native threading mode and tuneables" 2025-08-01 14:14:36 +00:00
Balazs Gibizer 8701a93743 Document native threading mode and tuneables
Change-Id: I003177de3a9f69c71c19eb8eaa7232785e03e669
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
2025-08-01 12:15:20 +02:00
Zuul b2a9d275dd Merge "Fix doc comment on manager role change" 2025-07-31 19:12:28 +00:00
Ghanshyam Maan f8d0b2ee98 Fix doc comment on manager role change
Fixing the review comments from
- https://review.opendev.org/c/openstack/nova/+/953063

Implement blueprint policy-manager-role-default

Change-Id: Idf376d9bd2eea981206738d0217ddc578875b280
Signed-off-by: Ghanshyam Maan <gmaan@ghanshyammann.com>
2025-07-31 10:24:25 +01:00
Zuul 0cd0a72227 Merge "Add project manager role in Nova API policy rule" 2025-07-30 21:28:19 +00:00
Takashi Natsume 6c03f9d1da Update contributor guide for 2025.2 Flamingo
Change-Id: Ibe2749f53069042d47b4828d5c12e6976265bd83
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2025-07-30 13:22:22 +00:00
Stephen Finucane d8e1248b7e api: Add response body schemas for images APIs
This is mostly uneventful save for us needing to fix our API ref, which
indicated that the 'OS-EXT-IMG-SIZE:size' field shown in the 'show' and
'detail' views was a string rather than an int. You can confirm this is
*not* the case like so:

  >>> import openstack
  >>> conn = openstack.connect()
  >>> conn.conn.compute.get('https://example.com/compute/v2.1/images/detail').json()

(obviously replace 'https://example.com/' with a compute API host)

Change-Id: Ia318478dfdb50f8d57a74958b3555f6ad97351ec
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-07-29 15:02:13 +01:00
Ghanshyam Mann 06699f26a5 Add project manager role in Nova API policy rule
Keystone project manager role can be used for the project-level
management APIs. Nova introduced the manager role in policy
defaults.

To introduced the manager role, we need to make migrations
policies more granular. Adding the separate policies for host
related operation allow us to open the migration operations
to project manager role. Existing policy is checked if migration
without specifying host and new policy is checked if host is
specified. Same will be applied to list migrations, new policy
will control to return the host info.

Also, Adding doc and releasenotes.

Partial implement blueprint policy-manager-role-default

Change-Id: Ie7d135e4d24ac6d53c46a4c69ade0b0bda554e71
Signed-off-by: Ghanshyam Mann <gmaan@ghanshyammann.com>
Signed-off-by: ghanshyam <gmaan@ghanshyammann.com>
2025-07-22 21:49:28 +00:00
Michael Still 697c05dd55 libvirt: Add objects and notifications for USB controller model.
This patch adds just the objects and notifications required to
support an extra spec to configure a USB controller inside
the guest. This is useful for SPICE consoles using the native
protocol.

Change-Id: I791b16c5bf0e860a188783c863e95dc423998b0a
Signed-off-by: Michael Still <mikal@stillhq.com>
2025-07-07 14:44:57 +10:00
Michael Still 183896a79b libvirt: Add objects and notifications for sound model.
This patch adds just the objects and notifications required to
support an extra spec to configure a sound device inside
the guest. This is useful for SPICE consoles using the native
protocol.

Change-Id: I2faeda0fd0fb9c8894d69558a1ccaab8da9f6a1b
Signed-off-by: Michael Still <mikal@stillhq.com>
2025-07-07 14:44:57 +10:00
Zuul 2c19c07d5e Merge "doc: Adding link for RabbitMQ installation during nova deployment on controller node." 2025-07-01 22:33:40 +00:00
Zuul 3e11280522 Merge "Validated that PCI alias has proper ids" 2025-06-12 03:28:54 +00:00
Zuul 45623879d9 Merge "Multiple spec per PCI alias limitation" 2025-06-12 03:28:17 +00:00
Zuul c127d87f02 Merge "Remove unused config options" 2025-06-11 22:43:02 +00:00
Balazs Gibizer acc6221660 Validated that PCI alias has proper ids
Either the vendor_id and product_id needs to be set or the
resource_class needs to be set in each alias. This is now validated when
the alias is parsed to avoid late failure during placement
allocation_candidates query.

Closes-Bug: #2111440
Change-Id: I7fd43b3d6faac8c4098b0983e8adc596414823a1
2025-06-11 07:23:01 -07:00
Balazs Gibizer c3f392dd8e Multiple spec per PCI alias limitation
Document and the limitation of the PCI in Placement feature that it
does not support [pci]alias configuration where the name of the alias is
repeated. E.g.

[pci]
alias = { "name": "vf1", "product_id":"10ca", "vendor_id":"8086", "device_type":"type-VF"}
alias = { "name": "vf1", "product_id":"f000", "vendor_id":"8086", "device_type":"type-VF"}

This would mean the alias vf1 can be fulfilled from devices with product
id 10ca OR f000. However this OR relationship cannot be encoded to a
single Placement allocation query as Placement does not support
requesting alternative resource classes for a request[2].

This limitation was encoded in the original PCI in Placement
implementation[1] but we missed to mention it in the doc.
This is now fixed.

[1]https://github.com/openstack/nova/blob/0d484ce37d86e989c8abdf57aec5e334f68206ef/nova/objects/request_spec.py#L504-L528
[2]https://docs.openstack.org/api-ref/placement/#list-allocation-candidates

Related-Bug: #2102038
Change-Id: I9dd78b1498f870a4e4c3f26c23d42d105aec0350
2025-06-11 07:23:00 -07:00
Zuul 517415b6cb Merge "update pre-commit version pins" 2025-06-10 16:23:41 +00:00
Arnaud Morin c4c5134369 Fix small documentation issue
Small documentation fix

Change-Id: Ibb650cf428eb9c20be1fdd0a4caee15fa6d309b7
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
2025-06-09 18:14:43 +02:00
Zuul 21943b5521 Merge "doc: Add missing API samples" 2025-06-08 23:14:07 +00:00
Zuul f1eaf682fe Merge "api: Add new, simpler api_version decorator" 2025-06-07 07:14:40 +00:00
Balazs Gibizer b3aefbcb58 Remove unused config options
In c12eebd4c6 we missed that there are
another set of config option that become unused now. So this is a follow
up patch to remove those as well.

Change-Id: Ie00805b5f72b118db134aeb8399ef4c72f434966
2025-06-06 13:31:00 +02:00
Pierre Riteau 6ba5168da8 doc: Fix Caracal release number
Change-Id: Id942d65c657bf537b7953e344aa31b747f78fec6
2025-06-05 17:45:14 +01:00
Balazs Gibizer a1c47fc242 [doc]Clarify where to set pci_in_placement
The doc is now clarifying that [filter_scheduler]pci_in_placement needs
to be set to nova-api, nova-scheduler, and nova-conductor config as
well.

Closes-Bug: #2112303
Change-Id: I3c7be2f109a97ef5cc4b2dc76cb7c58ef8c68afa
2025-06-02 11:12:14 +02:00
Dmitriy Chubinidze 6621832635 doc: Adding link for RabbitMQ installation during nova deployment on controller node.
Change-Id: I46456cf88c60b565196c41a98743f0c4c4e40999
Closes-Bug: #2091585
2025-05-31 14:40:42 +00:00
Zuul 42f80b94ad Merge "Mention IRC topic update in PTL post-PTG checklist" 2025-05-19 10:20:49 +00:00
Zuul cda0d82570 Merge "live migration: Avoid volume rollback mismatches" 2025-05-16 04:49:25 +00:00
Zuul b7c0aa1eb8 Merge "[doc] Adding vGPUs max_instances caveat fix for virtual-gpu" 2025-05-15 07:40:47 +00:00
Sylvain Bauza e3c494cbd9 [doc] Adding vGPUs max_instances caveat fix for virtual-gpu
When I069879a333152bb849c248b3dcb56357a11d0324 merged in Caracal, we forgot
to add documentation for the SR-IOV GPU caveat fix.
Also, given the new max_instances option was dynamic, we can't even see it
in the configuration list, so actually none of our operators can know that we
fixed it and how to do it 🤦

Change-Id: I3402c28f76cc51dd8c003181f11e0820ce5d9b7d
Related-Bug: #2041519
2025-05-14 19:26:11 +02:00
René Ribaud bfbea63f3f Mention IRC topic update in PTL post-PTG checklist
Adds a reminder in the PTL guide to update the #openstack-nova IRC
channel.

Change-Id: If002a02f3106d5f6bd0b234f9db212a953cab08c
2025-05-14 10:52:39 +02:00
Dan Smith 28331fee3c Example NVMe cleaning script for one-time-use
This is an example NVMe cleaner script that can listen to notifications
from a per-compute topic and perform basic NVMe (or generic command)
cleaning as a result.

It also supports periodic cleaning, notification pooling (if desired,
but not recommended), and single-shot (i.e. cron) mode.

I ran this while hammering my devstack node in a tight loop of create/
delete with a PCI device. The creates would succeed and fail as the
cleaning took a few seconds per iteration, then recover, create again,
delete, clean, etc. Dozens of loops in a row with expected results.

Related to blueprint one-time-use-devices

Change-Id: Ie4e81d6319499a3bf12b60e0af4cdb291fca9503
2025-05-13 13:02:40 -07:00
Stephen Finucane 4520a058c8 doc: Add missing API samples
These have been introduced at some point and now appear when running the
API samples test with GENERATE_SAMPLES=True. Add them.

Change-Id: Ic4b6b685f17e8d411776e20f239daa0736ae9a0b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-13 12:04:50 +01:00
Stephen Finucane 08dd30d3fc api: Add new, simpler api_version decorator
Get rid of the whole API version switching madness and make our schema
generation _significantly_ simpler.

This looks a lot larger than it actually is. In most cases, this is
simply 's/wsgi.Controller.api_version/wsgi.api_version/'.

Change-Id: I180bfad84c38653709c216282099d9b3fb64c5a7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-13 12:04:50 +01:00
Sean Mooney 87c0c201a3 update pre-commit version pins
This change bumps to the latest version of each
of our pre-commit hooks. Of note this add py3.13
support to autopep8.

Codespell was also updated and the new spelling
issues resolved.

Change-Id: I1aab019ffb0ee9366a7d26515bef1335d09044df
2025-05-08 23:29:13 +01:00
melanie witt 5a55a78d51 live migration: Avoid volume rollback mismatches
The tl;dr is to 1) avoid trying to disconnect volumes on the
destination if they were never connected in the first place and
2) avoid trying to disconnect volumes on the destination using block
device info for the source.

Details:

* Only remotely disconnect volumes on the destination if the failure
  was not during pre_live_migration(). When pre_live_migration() fails,
  its exception handling deletes the Cinder attachment that was created
  before re-raising and returning from the RPC call. And the BDM
  connection_info in the database is not guaranteed to reference the
  destination because a failure could have happened after the Cinder
  attachment was created but before the new connection_info was saved
  back to the database.  In this scenario, there is no way to reliably
  disconnect volumes in the destination remotely from the source because
  the destination connection_info needed to do it might not be
  available.

* Due to the first point, this adds exception handling to disconnect
  the volumes while still on the destination, while the destination
  connection_info is still available instead of trying to do it
  remotely from the source afterward.

* Do not pass Cinder volume block_device_info when calling
  rollback_live_migration_on_destination() because volume BDM records
  have already been rolled back to contain info for the source by
  that point. Not passing volume block_device_info will prevent
  driver.destroy() and subsequently driver.cleanup() from attempting to
  disconnect volumes on the destination using connection_info for the
  source.

Closes-Bug: #1899835

Change-Id: Ia62b99a16bfc802b8ba895c31780e9956aa74c2d
2025-04-28 18:11:25 -07:00
Sean Mooney 02d72b9d56 Remove nova debugger functionality
The nova debuger functionality was intended
to help debugging running process however it has
never been reliable due to our use of eventlet and is generally
not required when not using eventlet. I.e. you can just
run the nova console-scripts form a debugger or add pdb
statements as required.

As part of the eventlet removal the debugger functionality is
removed given its untested and undocumented.

Change-Id: I7bf88f06f3d1dbd2c7e342b27a21440a123c631d
2025-04-25 14:37:44 +02:00
Zuul f1e843af0d Merge "[doc]Describe file based GMR triggering" 2025-04-25 10:57:52 +00:00