-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Description
What happened?
sriov-device-plugin reads wrong PFName
(https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/blob/master/pkg/utils/utils.go#L103)
The code returns first file name from the list, which does match the right interface of the PF.
What did you expect to happen?
The code should be able to read the net interface of the Pf.
What are the minimal steps needed to reproduce the bug?
Assumption: System uses a Mellanox Connect-X.
- Create a SFS.
- The sriov-device-plugin is deployed without any priv mode or NET_ADMIN capabilities
- Use the config.json as suggested below.
- When we listed the path as used the source code for getPfName
[root@nd-sjc6w-dev-gs-22a net]# pwd
/sys/bus/pci/devices/0000:07:00.2/physfn/net
[root@nd-sjc6w-dev-gs-22a net]# ls
en7f0pf0sf0 en7f0pf0sf2 en7f0pf0sf4 ens3f0 ens3f0_1 ens3f0_11 ens3f0_13 ens3f0_15 ens3f0_3 ens3f0_5 ens3f0_7 ens3f0_9
en7f0pf0sf1 en7f0pf0sf3 en7f0pf0sf5 ens3f0_0 ens3f0_10 ens3f0_12 ens3f0_14 ens3f0_2 ens3f0_4 ens3f0_6 ens3f0_8
Note: In the above a few SFs are created, the code returns en7f0pf0sf0 as pfName, but ens3f0 is the right one.
Anything else we need to know?
Component Versions
Please fill in the below table with the version numbers of components used.
Component | Version |
---|---|
SR-IOV Network Device Plugin | Master |
SR-IOV CNI Plugin | |
Multus | |
Kubernetes | |
OS |
Config Files
Config file locations may be config dependent.
Device pool config file location (Try '/etc/pcidp/config.json')
{
"resourceList": [
{
"resourceName": "bf2",
"resourcePrefix": "nvidia.com",
"excludeTopology": true,
"selectors": {
"vendors": [
"15b3"
],
"devices": [
"101e"
],
"drivers": [
"mlx5_core"
],
"pfNames": [
"ens3f0#3-11"
]
}
},
{
"resourceName": "bf2_mirror_sf",
"resourcePrefix": "nvidia.com",
"excludeTopology": true,
"deviceType": "auxNetDevice",
"selectors": {
"vendors": [
"15b3"
],
"devices": [
"a2d6"
],
"auxTypes": [
"sf"
],
"pfNames": [
"ens3f0#3-5"
]
}
},
{
"resourceName": "bf2_vfio",
"resourcePrefix": "nvidia.com",
"excludeTopology": true,
"selectors": {
"vendors": [
"15b3"
],
"devices": [
"101e"
],
"drivers": [
"vfio-pci"
],
"pfNames": [
"ens3f0#12-15"
]
}
}
]
}
The current code fails to handle the pfNames for SF "ens3f0#3-5".
Multus config (Try '/etc/cni/multus/net.d')
CNI config (Try '/etc/cni/net.d/')
Kubernetes deployment type ( Bare Metal, Kubeadm etc.)
Kubeconfig file
SR-IOV Network Custom Resource Definition
Logs
SR-IOV Network Device Plugin Logs (use kubectl logs $PODNAME
)
Multus logs (If enabled. Try '/var/log/multus.log' )
Kubelet logs (journalctl -u kubelet)
Metadata
Metadata
Assignees
Labels
No labels