Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1913862

Summary: [OSP17.0] derive_pci_passthrough_whitelist.py is failing when PCI addresses are supplied in NovaPCIPassthrough
Product: Red Hat OpenStack Reporter: Vadim Khitrin <vkhitrin>
Component: openstack-tripleo-heat-templatesAssignee: Vijayalakshmi Candappa <vcandapp>
Status: CLOSED ERRATA QA Contact: Joe H. Rahme <jhakimra>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: astillma, cfields, gregraka, hakhande, jamsmith, jraju, jschluet, ksundara, mburns, mgeary, supadhya, vcandapp
Target Milestone: gaKeywords: Bugfix, Triaged
Target Release: 17.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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" ----
Story Points: ---
Clone Of:
: 2071911 (view as bug list) Environment:
Last Closed: 2022-09-21 12:13:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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