Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/onsi/ginkgo/v2 v2.27.3
github.com/onsi/gomega v1.38.3
github.com/stretchr/testify v1.11.1
github.com/vishvananda/netlink v1.3.1
github.com/vishvananda/netlink v1.3.2-0.20260310143705-0fc897210fbd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The pseudo-version for github.com/vishvananda/netlink has an incorrect timestamp. The year is 2026, but the commit 0fc897210fbd was made in 2024. This should be corrected to avoid potential dependency resolution issues. The correct version string should be v1.3.2-0.20240310143705-0fc897210fbd. Please update this line and then run go mod tidy to update go.sum.

Suggested change
github.com/vishvananda/netlink v1.3.2-0.20260310143705-0fc897210fbd
github.com/vishvananda/netlink v1.3.2-0.20240310143705-0fc897210fbd

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ashokpariya0 can you please fix this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing to fix here, this suggestion is wrong i think, because this commit was done in 2026 only,
you can see here-https://github.com/vishvananda/netlink/commits/main/
bot mistakenly claimed it was from 2024, which is incorrect

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this is a gemini's allucination.
The problem is with the e2e tests, which are consistently failing on this PR only.

Looking at the archives, I see:

2026-03-13T13:35:10Z [verbose] ADD finished CNI request ContainerID:"9a09169f6ef9efdee12c1a46687463daa88dc12c9c7e649b35b0e5bfbd69b2b0" Netns:"/var/run/netns/ba7a2ff6-e224-4412-ad25-986d94fb9833" IfName:"eth0" Args:"IgnoreUnknown=1;K8S_POD_NAMESPACE=sriov-conformance-testing;K8S_POD_NAME=testpod-5jtcv;K8S_POD_INFRA_CONTAINER_ID=9a09169f6ef9efdee12c1a46687463daa88dc12c9c7e649b35b0e5bfbd69b2b0;K8S_POD_UID=b3965931-b723-47cb-9a3c-81e3dbc7aa5a" Path:"", result: "", err: error configuring pod [sriov-conformance-testing/testpod-5jtcv] networking: [sriov-conformance-testing/testpod-5jtcv/b3965931-b723-47cb-9a3c-81e3dbc7aa5a:test-apivolnetwork]: error adding container to network "test-apivolnetwork": failed to get original vf information: failed to find vf 4

please take a look at the artifacts in
https://github.com/k8snetworkplumbingwg/sriov-cni/actions/runs/22939939733?pr=404

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am checking this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collectVFInfo is true by default
https://github.com/vishvananda/netlink/blob/ddba687f44e58e84459de72e6d940abd44ff33f8/handle_linux.go#L152

but we are using zero value struct here at-

var netLinkLib NetlinkManager = &MyNetlink{}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give a try with after adding this commit to the PR?
63f57b9 -
as pointed out earlier this is not enough, we see below issue too

Warning FailedCreatePodSandBox 8s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_testpod-7bw4b_sriov-conformance-testing_c214752f-2478-4431-adac-c78b3aded285_0(f8363a893d1db46350199cdb2a3409a020f961255763e573eeb4b0fd7353a06d): error adding pod sriov-conformance-testing_testpod-7bw4b to CNI network "multus-cni-network": plugin type="multus-shim" name="multus-cni-network" failed (add): CmdAdd (shim): CNI request failed with status 400: 'ContainerID:"f8363a893d1db46350199cdb2a3409a020f961255763e573eeb4b0fd7353a06d" Netns:"/var/run/netns/e45b0d75-1bb9-4d22-9da7-ddff0624ebaf" IfName:"eth0" Args:"IgnoreUnknown=1;K8S_POD_NAMESPACE=sriov-conformance-testing;K8S_POD_NAME=testpod-7bw4b;K8S_POD_INFRA_CONTAINER_ID=f8363a893d1db46350199cdb2a3409a020f961255763e573eeb4b0fd7353a06d;K8S_POD_UID=c214752f-2478-4431-adac-c78b3aded285" Path:"" ERRORED: error configuring pod [sriov-conformance-testing/testpod-7bw4b] networking: [sriov-conformance-testing/testpod-7bw4b/c214752f-2478-4431-adac-c78b3aded285:test-me-network]: error adding container to network "test-me-network": failed to set up pod interface "net1" from the device "ens2048f0np0": setupVF failed: failed to find "ens2048f0v0" in tempNS after retries: Link not found; rollback failed: failed to find interface with any of the possible names: [net1 ens2048f0v0]
': StdinData: {"auxiliaryCNIChainName":"vendor-cni-chain","binDir":"/var/lib/cni/bin","clusterNetwork":"/host/run/multus/cni/net.d/10-ovn-kubernetes.conf","cniVersion":"0.3.1","daemonSocketDir":"/run/multus/socket","globalNamespaces":"default,openshift-multus,openshift-sriov-network-operator,openshift-cnv","logLevel":"verbose","logToStderr":true,"name":"multus-cni-network","namespaceIsolation":true,"type":"multus-shim"}
[root@b3e26~]#
[root@b3e26 ~]#
[root@b3e26 ~]#
[root@b3e26 ~]# oc debug node/master-0.ocp-ashok.lnxero1.boe
Starting pod/master-0ocp-ashoklnxero1boe-debug-g48db ...
To use host binaries, run chroot /host. Instead, if you need to access host namespaces, run nsenter -a -t 1.
Pod IP: 172.23.228.37
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
sh-5.1# lspci
0000:00:00.0 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function
0001:00:00.0 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function
0002:00:00.0 Ethernet controller: Mellanox Technologies MT2894 Family [ConnectX-6 Lx]
0002:00:00.1 Ethernet controller: Mellanox Technologies MT2894 Family [ConnectX-6 Lx]
0002:00:00.2 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function
0002:00:00.3 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function
sh-5.1# ip show link ens2048f0v0
Object "show" is unknown, try "ip help".
sh-5.1# ip link show ens2048f0v0
124: ens2048f0v0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 4e:e1:71:5c:40:7a brd ff:ff:ff:ff:ff:ff
altname enP2p0s0f0v0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once we move ns to temporary ns at:
https://github.com/k8snetworkplumbingwg/sriov-cni/blob/master/pkg/sriov/sriov.go#L101

lookup inside temp ns is failing-

return fmt.Errorf("failed to find %q in tempNS: %v", linkName, err)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some tests and my thought is that we need to fix the library

Using the netlink.NewHandle() method completely changes the library behavior, as the netlink requests become bound to the namespace where the NewHandle is invoked.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion here:
vishvananda/netlink#1173 (comment)

we are waiting for the corresponding changes to be merged in netlink before proceeding. cc @zeeke

golang.org/x/net v0.48.0
golang.org/x/sys v0.39.0
)
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
github.com/vishvananda/netlink v1.3.1 h1:3AEMt62VKqz90r0tmNhog0r/PpWKmrEShJU0wJW6bV0=
github.com/vishvananda/netlink v1.3.1/go.mod h1:ARtKouGSTGchR8aMwmkzC0qiNPrrWO5JS/XMVl45+b4=
github.com/vishvananda/netlink v1.3.2-0.20260310143705-0fc897210fbd h1:SmF/bDDJ2Or3BpR2R1Fk2wnKx6rQfc5P4gZG0alwCHo=
github.com/vishvananda/netlink v1.3.2-0.20260310143705-0fc897210fbd/go.mod h1:lEui7SPMd9fgxzHVGRAvTxsBGCF6PRH81o2kLWLWHgw=
github.com/vishvananda/netns v0.0.5 h1:DfiHV+j8bA32MFM7bfEunvT8IAqQ/NzSJHtcmW5zdEY=
github.com/vishvananda/netns v0.0.5/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
Expand All @@ -76,8 +76,6 @@ golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
Expand Down
Loading