Synchronise 2025.1 with upstream#202
Merged
priteau merged 13 commits intostackhpc/2025.1from May 11, 2026
Merged
Conversation
Related-Bug: #2102038 Change-Id: Ia950fc16ac5bb890baaa826580e7cb05d64831df (cherry picked from commit ebf5aca)
PCI in Placement never supported PCI aliases with multiple specs, i.e. when an alias name is used in multiple alias definitions. The code raised ValueError late and without a proper error message. Now PciInvalidAlias with a descriptive message is raised instead. Closes-Bug: #2102038 Change-Id: Id1407a37dc5ddad22d8dbf7d589ed998ffc2804e (cherry picked from commit 0bfac5c)
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
(cherry picked from commit c3f392d)
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.
Conflicts:
nova/conf/pci.py due to I62ec475988eab8de948498f50d8d4c0d47321102
not on stable/2025.1
Closes-Bug: #2111440
Change-Id: I7fd43b3d6faac8c4098b0983e8adc596414823a1
(cherry picked from commit acc6221)
Both nova-api and nova-compute depends on the [pci]alias configuration. These services loaded and validated the config lazily when it was needed. This can late and hard to troubleshoot failures during instance lifecycle operations due to simple config errors. So this patch adds an early load of this config to nova-api and nova-compute. Related-Bug: #2102038 Related-Bug: #2111440 Change-Id: I5d5dc912ca24979067984c7cb53ceaded7daf236 (cherry picked from commit ae064ca)
For each lifecycle operation nova re-load, parses, and validates the [pci]alias config option. This is wasteful. So this patch adds functools.cache decorator on the function used to do this work. Change-Id: If2ffb25430749a22c923c0938221833e7b883873 (cherry picked from commit 0065bb6)
When retrieving devices by alias we should respect the from_persistent_config config option. Otherwise the persistent disk detach always throws the disk detach failed warning because of checking the live config. [1] https://github.com/openstack/nova/blob/ba24639b8dd34a19885298cf728e58dd7db9e703/nova/virt/libvirt/driver.py#L2653 Fixes LP Bug: #2140347 Change-Id: I454403256c5a98fd3502a25c9ad8291d6492ae08 Signed-off-by: Max Lamprecht <max.lamprecht@stackit.cloud> (cherry picked from commit 17b6b12) (cherry picked from commit 5a84627) (cherry picked from commit b6ca544)
…nto stable/2025.1
priteau
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains a snapshot of 2025.1 from upstream stable/2025.1.