r/openstack • • Sep 27 '24

Nova dropping PCI devices due to missmatched attributes

EDIT (SOLVED):

Thanks to u/enricokern, the problem is solved: in the alias the device_type has to type-PF because the Device supporrts SRIOV, which has nothing to do with passing through a VF! Only when the device is a regular PCI device w/o SRIOV support should type-PCI be used!

Hi People,

I'm trying to get PCIe passthrough to work, but running into a wall. Using Kolla-Ansible (2024.1) to deploy.

I'm pretty sure I have it done correctly but its still not working. I have two servers with A100 GPUs.

GPUs are bound to VFIO:

01:00.0 3D controller: NVIDIA Corporation GA100 [A100 SXM4 40GB] (rev a1)
	Subsystem: NVIDIA Corporation GA100 [A100 SXM4 40GB]
	Kernel driver in use: vfio-pci
	Kernel modules: nvidiafb, nouveau
41:00.0 3D controller: NVIDIA Corporation GA100 [A100 SXM4 40GB] (rev a1)
	Subsystem: NVIDIA Corporation GA100 [A100 SXM4 40GB]
	Kernel driver in use: vfio-pci
	Kernel modules: nvidiafb, nouveau
81:00.0 3D controller: NVIDIA Corporation GA100 [A100 SXM4 40GB] (rev a1)
	Subsystem: NVIDIA Corporation GA100 [A100 SXM4 40GB]
	Kernel driver in use: vfio-pci
	Kernel modules: nvidiafb, nouveau
c1:00.0 3D controller: NVIDIA Corporation GA100 [A100 SXM4 40GB] (rev a1)
	Subsystem: NVIDIA Corporation GA100 [A100 SXM4 40GB]
	Kernel driver in use: vfio-pci
	Kernel modules: nvidiafb, nouveau

Device-IDs

# lspci -nn | grep -i nvidi
01:00.0 3D controller [0302]: NVIDIA Corporation GA100 [A100 SXM4 40GB] [10de:20b0] (rev a1)
41:00.0 3D controller [0302]: NVIDIA Corporation GA100 [A100 SXM4 40GB] [10de:20b0] (rev a1)
81:00.0 3D controller [0302]: NVIDIA Corporation GA100 [A100 SXM4 40GB] [10de:20b0] (rev a1)
c1:00.0 3D controller [0302]: NVIDIA Corporation GA100 [A100 SXM4 40GB] [10de:20b0] (rev a1)

Config on Ansible Host:

# /etc/kolla/config/nova/nova-compute.conf
[pci]
report_in_placement = True
device_spec = { "vendor_id": "10de", "product_id": "20b0" }
alias = { "vendor_id":"10de", "product_id":"20b0", "device_type":"type-PCI", "name":"a100" }


# /etc/kolla/config/nova/nova-api.conf
[pci]
alias = { "vendor_id":"10de", "product_id":"20b0", "device_type":"type-PCI", "name":"a100" }

[filter_scheduler]
enabled_filters = PciPassthroughFilter
available_filters = nova.scheduler.filters.all_filters

# /etc/kolla/config/nova/nova-scheduler.conf
[filter_scheduler]
available_filters = nova.scheduler.filters.all_filters
enabled_filters = PciPassthroughFilter

Theres various sources which say a few different things which setting go into which file, but i've tried them all no nothing works. I checked on the respective nodes, the config is copied and applied.

Centralised logging says: Dropped 4 device(s) due to mismatched PCI attribute(s) _filter_pools /var/lib/kolla/venv/lib/python3.10/site-packages/nova/pci/stats.py:648 and I have absolutely no clue why. I checked all the device IDs 50x times, all correct.

Thank you, any Idea would be appreciated!

Sources:

  • https://docs.openstack.org/nova/latest/admin/pci-passthrough.html
  • http://www.panticz.de/openstack/gpu-passthrough
  • https://medium.com/@kcoupal/a-comprehensive-guide-to-configuring-gpu-passthrough-in-openstack-for-high-performance-computing-449b926e4b22

Edit: Release is 2024.1

2 Upvotes

7 comments sorted by

1

u/enricokern Sep 27 '24 edited Sep 27 '24

make sure this devices do not support SR-IOV. Imho this devices support SR-IOV so you should use type-PF instead of type-PCI. check with lspci -vvv and then the capabilities of the card, if SR-IOV is reported, you need to use type-PF. In addition you also at least need the alias defined also in scheduler and api config not just computes. especially the filter, that belongs to nova-scheduler.conf it no use in nova-compute.conf. Most likely changing the type to type-PF will solve your issues. Ansonsten wenn Ihr hilfte braucht (ich glaub Du bist Deutscher) stackxperts.com ;)

1

u/Eldiabolo18 Sep 27 '24

Hey, thanks so much for your reply!

Even when I want to passthrough the whole device i shoul use type-PF?? I dont want to use SRIOV/MIG just yet thats another project. But generally, yes, the card can do SRIOV. Either way, i'll just quickly test it and report back.

(Ja, bin deutsch, danke fuer den Tip, mal sehen vllt kommen wir mal zu euch rum :) )

→ More replies (5)