Bug 1913862 - [OSP17.0] derive_pci_passthrough_whitelist.py is failing when PCI addresses are supplied in NovaPCIPassthrough
Summary: [OSP17.0] derive_pci_passthrough_whitelist.py is failing when PCI addresses a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: 17.0
Assignee: Vijayalakshmi Candappa
QA Contact: Joe H. Rahme
URL:
Whiteboard:
: 1803502 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-07 18:08 UTC by Vadim Khitrin
Modified: 2022-09-21 12:14 UTC (History)
12 users (show)

Fixed In Version: openstack-tripleo-heat-templates-14.3.1-0.20220204033128.9b9ecb3
Doc Type: Enhancement
Doc Text:
In Red Hat OpenStack Platform (RHOSP) 17.0 GA, for NIC-partitioned deployments, you can now pass through virtual functions (VFs) to VMs. + To pass through VFs, in a heat environment file, you must specify the VF product ID, vendor ID, and the physical function (PF) PCI addresses: + ---- NovaPCIPassthrough: - product_id: "<VF_product_ID>" vendor_id: "<vendor_ID>" address: "<PF_PCI_addresses>" trusted: "true" ---- + The PF PCI address parameter supports string and dict mapping. You can specify wildcard characters and use regular expressions when specifying one or more addresses. + .Example + ---- NovaPCIPassthrough: - product_id: "0x7b18" vendor_id: "0x8086" address: "0000:08:00.*" trusted: "true" ----
Clone Of:
: 2071911 (view as bug list)
Environment:
Last Closed: 2022-09-21 12:13:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 799318 0 None MERGED Update dervice_pci script to handle pci address formats 2022-01-28 13:31:29 UTC
OpenStack gerrit 826433 0 None MERGED Update dervice_pci script to handle pci address formats 2022-02-03 05:24:54 UTC
OpenStack gerrit 826810 0 None MERGED Update dervice_pci script to handle pci address formats 2022-05-12 13:13:21 UTC
OpenStack gerrit 827397 0 None MERGED Update dervice_pci script to handle pci address formats 2022-05-12 13:13:21 UTC
OpenStack gerrit 827398 0 None MERGED Update dervice_pci script to handle pci address formats 2022-05-12 13:13:21 UTC
Red Hat Issue Tracker NFV-1957 0 None None None 2022-01-21 06:55:11 UTC
Red Hat Issue Tracker OSP-4135 0 None None None 2021-12-21 13:49:39 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:14:33 UTC

Description Vadim Khitrin 2021-01-07 18:08:49 UTC
Description of problem:
(Encountered when working on https://bugzilla.redhat.com/show_bug.cgi?id=1878201)
When attempting to pass a list of PCI addresses to 'NovaPCIPassthrough' in a NIC partitioning setup, the derive PCI passthrough whitelist script (/usr/share/openstack-tripleo-heat-templates/deployment/neutron/derive_pci_passthrough_whitelist.py) has an error causing the deployment to fail.

Configuration attempted:
    NovaPCIPassthrough:
      - vendor_id: "8086"
        product_id: "1572"
        address: "0000:86:00.2"
        trusted: "true"
        physical_network: "sriov-1"
      - vendor_id: "8086"
        product_id: "1572"
        address: "0000:86:00.3"
        trusted: "true"
        physical_network: "sriov-2"
      - vendor_id: "8086"
        product_id: "1572"
        address: "0000:86:00.0"
        trusted: "true"
        physical_network: "sriov-part-1"
      - vendor_id: "8086"
        product_id: "1572"
        address: "0000:86:00.1"
        trusted: "true"
        physical_network: "sriov-part-2"

Exception raised by script:
Traceback (most recent call last):
  File "/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py", line 313, in <module>
    user_configs, system_configs)
  File "/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py", line 283, in generate_combined_configuration
    user_config, pf, allocated_pci)
  File "/var/lib/pci_passthrough_whitelist_scripts/derive_pci_passthrough_whitelist.py", line 169, in get_passthrough_config
    get_regex_pattern(addr_dict['domain'], 4),
TypeError: string indices must be integers


Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-11.3.2-1.20200914170177.el8ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Deploy overcloud with NovaPCIPassthrough parameter including PCI addresses

Actual results:
Derive PCI passthrough whitelist script is raising an error causing the deployment to fail.

Expected results:
Deployment is passing and accurate PCI passthrough whitelist is derived.

Additional info:

Comment 1 Chris Fields 2021-03-19 16:20:53 UTC
Hit this bug in a 16.1.3 with a pci straight passthrough deployment.  Work around was to comment out pci address (#address) and add 'devname.'

Comment 9 Haresh Khandelwal 2022-05-12 10:40:20 UTC
*** Bug 1803502 has been marked as a duplicate of this bug. ***

Comment 25 errata-xmlrpc 2022-09-21 12:13:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543


Note You need to log in before you can comment on or make changes to this bug.