4203 Commits

Author SHA1 Message Date
Zuul
bbebdc3928 Merge "Fix typos in nova docs" 2022-10-06 12:09:51 +00:00
Zuul
aad31e6ba4 Merge "Update nova-manage doc page" 2022-09-23 03:40:59 +00:00
Rajesh Tailor
0fce3c03ab Fix typos in nova docs
Change-Id: I7b6f8c198aa42f5ef3f8b158308b993b040454ec
2022-09-23 09:09:37 +05:30
Pierre Riteau
4fb4f6832c Remove mentions of removed scheduler filters
Change-Id: I1348cca8cbd8b1142dab8507c8aa1b9baf01e73c
2022-09-16 10:39:42 +02:00
Rajesh Tailor
023d2b4a9a Update nova-manage doc page
nova-manage doc page [1] mentioned usage of `nova-manage db archive`
command, which doesn't exist.

This change updates the doc page with the correct command
`nova-manage db archive_deleted_rows`.

[1] https://docs.openstack.org/nova/latest/cli/nova-manage.html

Closes-Bug: #1981088
Change-Id: Ibcbccf87ec70e9edea61c99d4d3bcf610cc1df64
2022-09-10 15:17:57 +05:30
Zuul
b542b53585 Merge "Doc follow up for PCI in placement" 2022-09-06 16:30:19 +00:00
Balazs Gibizer
efb6fd834e Doc follow up for PCI in placement
This fixes the doc comments for the already merged (or being merged)
patches in the series.

blueprint: pci-device-tracking-in-placement
Change-Id: Ia99138d603722a66c9a6ac61b035384d86ccca75
2022-09-02 14:20:18 +02:00
Zuul
457806e206 Merge "libvirt: Add vIOMMU device to guest" 2022-09-01 19:56:09 +00:00
Zuul
8b55b44cc6 Merge "Allow enabling PCI tracking in Placement" 2022-09-01 18:21:52 +00:00
Zuul
82498dfe4b Merge "Handle PCI dev reconf with allocations" 2022-09-01 18:21:45 +00:00
Zuul
40ca5e169a Merge "Heal PCI allocation during resize" 2022-09-01 18:16:04 +00:00
Zuul
bcdf5988f6 Merge "Add API support for rebuilding BFV instances" 2022-09-01 07:53:12 +00:00
Stephen Finucane
14e3b352c2 libvirt: Add vIOMMU device to guest
Implementation for BP/libvirt-viommu-device.
With provide `hw:viommu_model` property to extra_specs or
`hw_viommu_model` to image property. will enable viommu to libvirt
guest.

[1] https://www.berrange.com/posts/2017/02/16/setting-up-a-nested-kvm-guest-for-developing-testing-pci-device-assignment-with-numa/
[2] https://review.opendev.org/c/openstack/nova-specs/+/840310

Implements: blueprint libvirt-viommu-device
Change-Id: Ief9c550292788160433a28a7a1c36ba38a6bc849
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-09-01 04:50:16 +08:00
Dan Smith
45c5b80fd0 Add API support for rebuilding BFV instances
This adds a microversion and API support for triggering a rebuild
of volume-backed instances by leveraging cinder functionality to
do so.

Implements: blueprint volume-backed-server-rebuild
Closes-Bug: #1482040

Co-Authored-By: Rajat Dhasmana <rajatdhasmana@gmail.com>

Change-Id: I211ad6b8aa7856eb94bfd40e4fdb7376a7f5c358
2022-08-31 18:05:03 +05:30
ghanshyam mann
6903456820 Add documentation and releasenotes for RBAC change
We have droped the system scope from Nova policy
and keeping the legacy admin behaviour same. This
commit adds the releasenotes and update the policy
configuration documentation accordingly.

Also, remove the upgrade check for policy which was
added for the system scope configuration protection.

Change-Id: I127cc4da689a82dbde07059de90c451eb09ea4cf
2022-08-30 01:44:33 +05:30
Balazs Gibizer
06389f8d84 Allow enabling PCI tracking in Placement
This patch introduces the [pci]report_in_placement config option that is
False by default but if set to True will enable reporting of the PCI
passthrough inventories to Placement.

blueprint: pci-device-tracking-in-placement
Change-Id: I49a3dbf4c5708d2d92dedd29a9dc3ef25b6cd66c
2022-08-27 12:41:20 +02:00
Balazs Gibizer
9268bc36a3 Handle PCI dev reconf with allocations
PCI devices which are allocated to instances can be removed from the
[pci]device_spec configuration or can be removed from the hypervisor
directly. The existing PciTracker code handle this cases by keeping the
PciDevice in the nova DB exists and allocated and issue a warning in the
logs during the compute service startup that nova is in an inconsistent
state. Similar behavior is now added to the PCI placement tracking code
so the PCI inventories and allocations in placement is kept in such
situation.

There is one case where we cannot simply accept the PCI device
reconfiguration by keeping the existing allocations and applying the new
config. It is when a PF that is configured and allocated is removed and
VFs from this PF is now configured in the [pci]device_spec. And vice
versa when VFs are removed and its parent PF is configured. In this case
keeping the existing inventory and allocations and adding the new inventory
to placement would result in placement model where a single PCI device
would provide both PF and VF inventories. This dependent device
configuration is not supported as it could lead to double consumption.
In such situation the compute service will refuse to start.

blueprint: pci-device-tracking-in-placement
Change-Id: Id130893de650cc2d38953cea7cf9f53af71ced93
2022-08-26 19:05:45 +02:00
Zuul
e4328ed7cd Merge "Add locked_memory extra spec and image property" 2022-08-26 15:22:08 +00:00
Balazs Gibizer
98e9989cad Heal PCI allocation during resize
During resize an instance with existing PCI allocation can be changed to
consume less, more, or different PCI devices. So the heal allocation
logic needs to handle the case when an existing instance is changed to
consume different PCI devices.

This patch adds support to change existing PCI allocations in placement
during resize.

There is one limitation of the healing logic. It assumes that there is
no in-progress migration when nova is upgraded. If there is an in
progress migration, then the PCI usage will not be healed in the
migration allocation. The placement view will be consistent after such
migration is completed or reverted.

blueprint: pci-device-tracking-in-placement
Change-Id: Icc968c567f9967d7449d6c6c1f57783098e63f55
2022-08-25 10:00:11 +02:00
Balazs Gibizer
01d7a39e00 Reject devname based device_spec config
We agreed not to support 'devname' based [pci]device_spec configuration
in the new PCI Placement tracking code. So this patch adds a check to
reject those.

blueprint: pci-device-tracking-in-placement
Change-Id: Ifa0dd34506ebc25cfe5bafd6952b72b0008fc741
2022-08-25 10:00:10 +02:00
Balazs Gibizer
10ba714125 Ignore PCI devs with physical_network tag
The first version of the PCI tracking in placement feature will not
handle Neutron based SRIOV devices. So those are now ignored during
placement inventory reporting.

blueprint: pci-device-tracking-in-placement
Change-Id: Ie24969d60c84379673c5450863f4cf58cf09207c
2022-08-25 10:00:10 +02:00
Balazs Gibizer
07f2bf8035 Reject mixed VF rc and trait config
If two VFs from the same PF are configured by two separate
[pci]device_spec entries then it is possible to define contradicting
resource classes or traits. This patch detects and rejects such
configuration.

blueprint: pci-device-tracking-in-placement
Change-Id: I623ab24940169991a400eba854c9619a11662a91
2022-08-25 10:00:10 +02:00
Balazs Gibizer
0d526d1f4b Reject PCI dependent device config
The PCI tracking in placement does not support the configuration where
both a PF and its children VFs are configured for nova usage. This patch
adds logic to detect and reject such configuration. To be able to kill
the service if started with such config special exception handling is
added for the update_available_resource code path, similarly how a
failed reshape is handled.

blueprint: pci-device-tracking-in-placement
Change-Id: I708724465d2afaa37a65c231c64da88fc8b458eb
2022-08-25 10:00:10 +02:00
Balazs Gibizer
2722038946 Extend device_spec with resource_class and traits
Each [pci]device_spec entry can specify the two new resource_class and
traits tags.

If the resource_class is specified then it will be used as the RC in the
placement inventory of the PCI devices matching the spec. If not
specified then the RC is defaulted CUSTOM_PCI_<vendor_id>_<product_id>.

The traits tag is a comma separated list of trait names. Nova will
report these traits to RP representing the matching PCI devices.

blueprint: pci-device-tracking-in-placement
Change-Id: I71b7a2fb8b03a3679733a98958b2f6d447ed5004
2022-08-25 10:00:10 +02:00
Balazs Gibizer
953f1eef19 Basics for PCI Placement reporting
A new PCI resource handler is added to the update_available_resources
code path update the ProviderTree with PCI device RPs, inventories and
traits.

It is a bit different than the other Placement inventory reporter. It
does not run in the virt driver level as PCI is tracked in a generic way
in the PCI tracker in the resource tracker. So the virt specific
information is already parsed and abstracted by the resource tracker.

Another difference is that to support rolling upgrade the PCI handler
code needs to be prepared for situations where the scheduler does not
create PCI allocations even after some of the compute already started
reporting inventories and started healing PCI allocations. So the code
is not prepared to do a single, one shot, reshape at startup, but
instead to do a continuous healing of the allocations. We can remove
this continuous healing after the PCI prefilter will be made mandatory
in a future release.

The whole PCI placement reporting behavior is disabled by default while
it is incomplete. When it is functionally complete a new
[pci]report_in_placement config option will be added to allow enabling
the feature. This config is intentionally not added by this patch as we
don't want to allow enabling this logic yet.

blueprint: pci-device-tracking-in-placement
Change-Id: If975c3ec09ffa95f647eb4419874aa8417a59721
2022-08-25 10:00:10 +02:00
Sean Mooney
572c2b18e2 Add locked_memory extra spec and image property
This change adds a new hw:locked_memory extra spec and hw_locked_memory
image property to contol preventing guest memory from swapping.

This change adds docs and extend the flavor
validators for the new extra spec.
Also add new image property.

Blueprint: libvirt-viommu-device
Change-Id: Id3779594f0078a5045031aded2ed68ee4301abbd
2022-08-24 21:47:32 +08:00
Sean Mooney
0aad338b1c Add VDPA support for suspend and livemigrate
This change append vnic-type vdpa to the list
of passthough vnic types and removes the api blocks

This should enable the existing suspend and live migrate
code to properly manage vdpa interfaces enabling
"hot plug" live migrations similar to direct sr-iov.

Implements: blueprint vdpa-suspend-detach-and-live-migrate
Change-Id: I878a9609ce0d84f7e3c2fef99e369b34d627a0df
2022-08-23 09:32:00 +01:00
Sean Mooney
6f1c7ab2e7 Add source dev parsing for vdpa interfaces
This change extends the guest xml parsing such that
the source device path can be extreacted from interface
elements of type vdpa.

This is required to identify the interface to remove when
detaching a vdpa port from a domain.

This change fixes a latent bug in the libvirt fixutre
related to the domain xml generation for vdpa interfaces.

Change-Id: I5f41170e7038f4b872066de4b1ad509113034960
2022-08-22 14:57:21 +01:00
Zuul
ddcc286ee1 Merge "enable blocked VDPA move operations" 2022-08-20 15:37:54 +00:00
Takashi Natsume
07022c7791 doc: Update a PTL guide
It does not need anymore to add database migration placeholders
because of using alembic.
So remove the description in the PTL guide.

Change-Id: If958dd78ff82e2239be1af3835a51a1a3551c5d9
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-08-20 06:18:58 +00:00
Zuul
13e4dd76f6 Merge "block_device: Add DriverImageBlockDevice to block_device_info" 2022-08-19 15:34:31 +00:00
Zuul
8860495e6a Merge "scheduler: Add an ephemeral encryption pre filter" 2022-08-19 03:47:53 +00:00
Zuul
c952c52cc9 Merge "image_meta: Add ephemeral encryption properties" 2022-08-18 12:31:22 +00:00
Sean Mooney
95f96ed3aa enable blocked VDPA move operations
This change adds functional test for operations on servers with VDPA
devices that are expected to work but currently blocked due to lack
of testing or qemu bugs.

cold-migrate, resize, evacuate,and shelve are enabled
and tested by this patch

Closes-Bug: #1970467
Change-Id: I6e220cf3231670d156632e075fcf7701df744773
2022-08-16 14:04:19 +01:00
Bence Romsics
5710a8ac06 Add limitation to docs about bug 1983570
Change-Id: Ie5611952ab8607bde02735503bfd84ba6c7990af
Partial-Bug: #1983570
2022-08-11 10:29:35 +02:00
Balazs Gibizer
14e68ac6e9 Rename [pci]passthrough_whitelist to device_spec
A later patch in the pci-device-tracking-in-placement work
will extend the existing [pci]passthrough_whitelist config syntax.
So we take the opportunity here to deprecate the old non inclusive
passthrough_whitelist name and introduce a better one.

All the usage of CONF.pci.passthrough_whitelist is now changed over to
the new device_spec config. Also the in tree documentation is updated
accordinly.

However the nova code still has a bunch of references to the
"whitelist" terminology. That will be handled in subsequent patches.

blueprint: pci-device-tracking-in-placement
Change-Id: I843032e113642416114f169069eebf6a56ed78dd
2022-08-10 17:08:35 +02:00
Amit Uniyal
de830f87b0 Adds img_config_drive in nova users docs
Added img_config_drive property usuage in nova users
config drive docs

Closes-Bug: #1879066
Change-Id: I56be0b6cda51447813c0a97b01ccb48d0c898c20
2022-08-05 13:01:46 +00:00
Zuul
7f5279edc9 Merge "For evacuation, ignore if task_state is not None" 2022-08-04 14:02:38 +00:00
Zuul
ad7249b3fc Merge "Remove the PowerVM driver" 2022-08-03 10:47:24 +00:00
Amit Uniyal
db919aa15f For evacuation, ignore if task_state is not None
ignore instance task state and continue with vm evacutaion

Closes-Bug: #1978983
Change-Id: I5540df6c7497956219c06cff6f15b51c2c8bc29d
2022-08-03 04:52:10 +00:00
Lee Yarwood
5df97016b4 block_device: Add DriverImageBlockDevice to block_device_info
Change-Id: I17e0758e3b77caebd4d142664a8367ab4601ebdf
2022-08-02 21:25:48 +00:00
Lee Yarwood
794d2f98d9 scheduler: Add an ephemeral encryption pre filter
Change-Id: I20b21f39c46895448b172f79a3e4603d124f2c53
2022-08-02 21:25:47 +00:00
Lee Yarwood
065b324835 image_meta: Add ephemeral encryption properties
Add the `hw_ephemeral_encryption` and `hw_ephemeral_encryption_format`
image properties.

Change-Id: Ida3edbdd664fbc3ac23516b1ff5b67edae43ea79
2022-08-02 21:25:47 +00:00
Stephen Finucane
deae814611 Remove the PowerVM driver
The PowerVM driver was deprecated in November 2021 as part of change
Icdef0a03c3c6f56b08ec9685c6958d6917bc88cb. As noted there, all
indications suggest that this driver is no longer maintained and may be
abandonware. It's been some time and there's still no activity here so
it's time to abandon this for real.

This isn't as tied into the codebase as the old XenAPI driver was, so
removal is mostly a case of deleting large swathes of code. Lovely.

Change-Id: Ibf4f36136f2c65adad64f75d665c00cf2de4b400
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-08-02 15:31:19 +02:00
Radosław Piliszek
b351f0b848 [docs] Fix mention of custom scheduling after Wallaby
Custom filters are still supported. Custom schedulers / scheduler
drivers are what is not. This patch fixes the wording.

Change-Id: Icf9576b75bd006ba65484b9232e85d8b748458f1
2022-08-02 10:15:51 +02:00
Sylvain Bauza
a755e5d9f2 api: Drop generating a keypair and add special chars to naming
As agreed in the spec, we will both drop the generation support for a keypair
but we'll also accept @ (at) and . (dot) chars in the keyname, all of them in
the same API microversion.

Rebased the work from I5de15935e83823afa545a250cf84f6a7a37036b4

APIImpact

Implements: blueprint keypair-generation-removal
Co-Authored-By: Nicolas Parquet <nicolas.parquet@gandi.net>

Change-Id: I6a7c71fb4385348c87067543d0454f302907395e
2022-07-28 11:05:50 +02:00
René Ribaud
09239fc2ea Allow unshelve to a specific host (REST API part)
This adds support to the REST API, in a new microversion, for specifying
a destination host to unshelve server action when the server
is shelved offloaded.
This patch also supports the ability to unpin the availability_zone of an
instance that is bound to it.

Note that the functional test changes are due to those tests using the
"latest" microversion 2.91.

Implements: blueprint unshelve-to-host
Change-Id: I9e95428c208582741e6cd99bd3260d6742fcc6b7
2022-07-22 10:22:34 +02:00
Zuul
bf347a17c0 Merge "Add a proper schema version to network_data.json" 2022-07-19 09:22:42 +00:00
Dmitry Tantsur
4fdc0807b4 Add a proper schema version to network_data.json
What we have there is not a schema URI. Having a proper URI allows
auto-detection of the schema version (draft-07 in this case).

Change-Id: I208a05c7ba64a21ed8cde7bc1ebae2b5878109e0
2022-07-14 17:59:21 +02:00
Artom Lifshitz
f77a9fee5b libvirt: remove default cputune shares value
Previously, the libvirt driver defaulted to 1024 * (# of CPUs) for the
value of domain/cputune/shares in the libvirt XML. This value is then
passed directly by libvirt to the cgroups API. Cgroups v2 imposes a
maximum value of 10000 that can be passed in. This makes Nova
unable to launch instances with more than 9 CPUs on hosts that run
cgroups v2, like Ubuntu Jammy or RHEL 9.

Fix this by just removing the default entirely. Because there is no
longer a guarantee that domain/cputune will contain at least a shares
element, we can stop always generating the former, and only generate
it if it will actually contain something.

We can also make operators's lives easier by leveraging the fact that
we update the XML during live migration, so this patch also adds a
method to remove the shares value from the live migration XML if one
was not set as the quota:cpu_shares flavor extra spec.

For operators that *have* set this extra spec to something greater
than 10000, their flavors will have to get updates, and their
instances resized.

Partial-bug: 1978489
Change-Id: I49d757f5f261b3562ada27e6cf57284f615ca395
2022-07-14 11:55:40 -04:00