Commit Graph

2669 Commits

Author SHA1 Message Date
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 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
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
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
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
Zuul e00f53aa8b Merge "docs: Correct path used for config on Hyper-V" 2022-05-30 16:54:55 +00:00
wnark 4d6cce1d10 docs: Correct path used for config on Hyper-V
Because in the above description:

  To install nova-compute, run:

  PS C:\> cd c:\nova
  PS C:\> python setup.py install

The file is downloaded to c:\nova. After executing `python setup.py
install` in this directory, the etc directory is generated under
`c:\nova`. Correct the path.

Closes-Bug: #1964548
Change-Id: Ibf0c1b56f235fffae65afbbcee30056bae965afe
2022-05-30 14:40:00 +01:00
Zuul 840c48fea7 Merge "Follow up for nova-manage image property commands" 2022-04-21 09:43:55 +00:00
Zuul 6a999d693e Merge "Update contributor guide for Zed" 2022-03-25 06:21:17 +00:00
Zuul d2b2516122 Merge "doc: Remove useless contributor/api-2 doc" 2022-03-23 15:13:32 +00:00
Zuul ba63a5647c Merge "doc: Split up notifications document" 2022-03-23 15:00:55 +00:00
Stephen Finucane 7beff288d6 doc: Remove useless contributor/api-2 doc
There's nothing of use in here. A section on creating extensions for the
API is removed since this is no longer a thing.

Change-Id: I18a6f642c046051cd6084ab920d78f27887ca13d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-03-23 09:58:32 +00:00
Takashi Natsume 0638d1eb44 Update contributor guide for Zed
Change-Id: I6dc244001e6f65b839e8507843040dae623a2c90
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-03-12 01:56:03 +09:00
Sylvain Bauza b92259e10a mention the cycle highlights in the ptl guide
Change-Id: Ibc13c18595aee90a70dd9345a69fb3344abd2e27
2022-03-01 11:11:14 +01:00
Zuul 868305b7d2 Merge "Complete phase-1 of RBAC community-wide goal" 2022-02-27 04:50:13 +00:00
melanie witt 453c11e05d Follow up for nova-manage image property commands
This a follow up for change Ic8783053778cf4614742186e94059d5675121db1
and corrects the 'image_property set --property' arg format in the
hw_machine_type doc. Newline formats in the nova-manage CLI doc is
cleaned up to be consistent throughout and unnecessary () is removed
from the ImagePropertyCommands class.

Related to blueprint libvirt-device-bus-model-update

Change-Id: I5b67e9ae5125f6dad68cae7ac0601ac5b02e74b3
2022-02-24 19:51:59 +00:00
Jonathan Race 31ff7ce7e2 driver/secheduler/docs for Adds Pick guest CPU architecture based on
host arch in libvirt driver support

This is split 2 of 3 for the architecture emulation feature.

This implements emulated multi-architecture support through qemu
within OpenStack Nova.

Additional config variable check to pull host architecture into
hw_architecture field for emulation checks to be made.

Adds a custom function that simply performs a check for
hw_emulation_architecture field being set, allowing for core code to
function as normal while enabling a simple check to enable emulated
architectures to follow the same path as all multi-arch support
already established for physical nodes but instead levaraging qemu
which allows for the overall emulation.

Added check for domain xml unit test to strip arch from the os tag,
as it is not required uefi checks, and only leveraged for emulation
checks.

Added additional test cases test_driver validating emulation
functionality with checking hw_emulation_architecture against the
os_arch/hw_architecture field. Added required os-traits and settings
for scheduler request_filter.

Added RISCV64 to architecture enum for better support in driver.

Implements: blueprint pick-guest-arch-based-on-host-arch-in-libvirt-driver
Closes-Bug: 1863728
Change-Id: Ia070a29186c6123cf51e1b17373c2dc69676ae7c
Signed-off-by: Jonathan Race <jrace@augusta.edu>
2022-02-24 12:25:59 -05:00
Ghanshyam Mann f9c1d1163d Complete phase-1 of RBAC community-wide goal
After moving the nova APIs policy as per the new guidlines
where system scoped token will be only allowed to access
system level APIs and will not be allowed any operation
on project level APIs. With that we do not need below
base rules (who have hardcoded 'system_scope:all' check_str):
- system_admin_api
- system_reader_api
- system_admin_or_owner
- system_or_project_reader

At this stage (phase-1 target), we allow below roles as targeted
in phase-1 [1]
1. ADMIN(this is System Administrator with scope_type 'system'
when scope enabled otherwise legacy admin)
2. PROJECT_ADMIN
3. PROJECT_MEMBER
4. PROJECT_READER
 & below one specific to nova
5. PROJECT_READER_OR_ADMIN (to allow system admin and project reader
to list flavor extra specs)

This complete the phase-1 of RBAC community-wide goal[2] for nova.

Add release notes too.

[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#how-operator
[2] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#yoga-timeline-7th-mar-2022

Partial implement blueprint policy-defaults-refresh-2

Change-Id: I075005d13ff6bfe048bbb21d80d71bf1602e4c02
2022-02-24 16:33:34 +00:00
Zuul b2ec3cd921 Merge "manage: Add image_property commands" 2022-02-24 13:00:52 +00:00
Lee Yarwood 19b7cf2170 manage: Add image_property commands
This adds an image property show and image property set command to
nova-manage to allow users to update image properties stored for an
instance in system metadata without having to rebuild the instance.
This is intended to ease migration to new machine types, as updating
the machine type could potentially invalidate the existing image
properties of an instance.

Co-Authored-By: melanie witt <melwittt@gmail.com>

Blueprint: libvirt-device-bus-model-update

Change-Id: Ic8783053778cf4614742186e94059d5675121db1
2022-02-24 01:00:36 +00:00
Zuul 26e65c3270 Merge "Update live_migration_downtime definition" 2022-02-23 20:12:03 +00:00
Pedro Almeida de110b042d Update live_migration_downtime definition
Before, the definition of live_migration_downtime didn't explain
if any exception/timeout occurs if the migration exceeds the value.
This is just used as a reference for nova and if any problem happens
when the VM gets paused, there will be no abort or force-complete.

Closes-Bug: #1960345
Signed-off-by: Pedro Almeida <pedro.monteiroazevedodemouraalmeida@windriver.com>
Change-Id: I336481d1801a367b5628fedcd2aa5f5cf763355a
2022-02-23 13:21:03 -03:00
Zuul cefc78e2d8 Merge "Fix to implement 'pack' or 'spread' VM's NUMA cells" 2022-02-17 20:28:04 +00:00
Dmitrii Shcherbakov 419391e97d Document remote-managed port usage considerations
While most of the SR-IOV related documentation resides in the Neutron
repository which is going to have a separate section on the topic of
supporting remote-managed ports and off-path networking backends, there
are still some things specific to Nova which are worth documenting in
Nova docs.

https://docs.openstack.org/neutron/latest/admin/config-sriov.html

Implements: blueprint integration-with-off-path-network-backends
Change-Id: I3c5fe8ec0539e10d07b1b4888e9833bc7ede1d04
2022-02-10 20:01:41 +03:00
Stephen Finucane c9a0c7da9b doc: Correct version for virtio-net multiqueue
This was eventually added in Yoga, not Xena.

Change-Id: I8afe755732c95d023b7c4bd99964507f54d324f1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-02-09 18:12:45 +00:00
Stephen Finucane 9a31212a44 doc: Split up notifications document
This was actually three documents in one:

- An admin doc detailing how to configure and use notifications
- A contributor doc describing how to extend the versioned notifications
- A reference doc listing available versioned notifications

Split the doc up to reflect this

Change-Id: I880f1c77387efcc3c1e147323b224e10156e0a52
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-02-09 18:02:04 +00:00
Stephen Finucane 95157314bd docs: Document virtio-net multiqueue
Mostly copy-paste from the spec, but at least this is in-tree and
updatable.

Change-Id: I4cad2111065fbc1840d44fc9f4bf6ac585e18db6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-02-09 18:00:05 +00:00
Ilya Popov d13412648d Fix to implement 'pack' or 'spread' VM's NUMA cells
Cells mean NUMA cells below in text.

By default, first instance's cell are placed to the host's cell with
id 0, so it will be exhausted first. Than host's cell with id 1 will
be used and exhausted. It will lead to error placing instance with
number of cells in NUMA topology equal to host's cells number if
some instances with one cell topology are placed on cell with id 0
before. Fix will perform several sorts to put less used cells at
the beginning of host_cells list based on PCI devices, memory and
cpu usage when packing_host_numa_cells_allocation_strategy is set
to False (so called 'spread strategy'), or will try to place all
VM's cell to the same host's cell untill it will be completely
exhausted and only after will start to use next available host's
cell (so called 'pack strategy'), when the configuration option
packing_host_numa_cells_allocation_strategy is set to True.

Partial-Bug: #1940668
Change-Id: I03c4db3c36a780aac19841b750ff59acd3572ec6
2022-02-08 10:46:28 +03:00
Zuul b6fe7521af Merge "docs: Follow-ups for cells v2, architecture docs" 2022-02-07 10:27:51 +00:00
Zuul 26ce7b30b2 Merge "docs: Add new architecture guide" 2022-02-03 18:28:02 +00:00
Stephen Finucane 136f1deb6e docs: Follow-ups for cells v2, architecture docs
Based on review feedback on [1] and [2].

[1] If39db50fd8b109a5a13dec70f8030f3663555065
[2] I518bb5d586b159b4796fb6139351ba423bc19639

Change-Id: I44920f20213462a3abe743ccd38b356d6490a7b4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-02-03 11:41:50 +00:00
Zuul b0633ac49b Merge "docs: Add a new cells v2 document" 2022-02-02 17:01:13 +00:00
Zuul bb2984b9c7 Merge "[doc] propose Review-Priority label for contribs" 2022-01-20 17:05:49 +00:00
Zuul a17b67ab2a Merge "Update Interop doc" 2022-01-14 22:27:56 +00:00