Skip to content

Synchronise 2025.1 with upstream#202

Merged
priteau merged 13 commits intostackhpc/2025.1from
upstream/2025.1-2026-05-11
May 11, 2026
Merged

Synchronise 2025.1 with upstream#202
priteau merged 13 commits intostackhpc/2025.1from
upstream/2025.1-2026-05-11

Conversation

@github-actions
Copy link
Copy Markdown

This PR contains a snapshot of 2025.1 from upstream stable/2025.1.

gibizer and others added 13 commits June 12, 2025 15:12
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)
@github-actions github-actions Bot added automated Automated action performed by GitHub Actions synchronisation labels May 11, 2026
@github-actions github-actions Bot requested a review from a team as a code owner May 11, 2026 07:32
@github-actions github-actions Bot added automated Automated action performed by GitHub Actions synchronisation labels May 11, 2026
@priteau priteau closed this May 11, 2026
@priteau priteau reopened this May 11, 2026
@priteau priteau enabled auto-merge May 11, 2026 08:37
@priteau priteau merged commit 7883100 into stackhpc/2025.1 May 11, 2026
4 checks passed
@priteau priteau deleted the upstream/2025.1-2026-05-11 branch May 11, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Automated action performed by GitHub Actions synchronisation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants