Skip to content

bump: update github.com/vishvananda/netlink to latest main pseudo-ver…#404

Open
ashokpariya0 wants to merge 1 commit intok8snetworkplumbingwg:masterfrom
ashokpariya0:bump-netlink-pkg
Open

bump: update github.com/vishvananda/netlink to latest main pseudo-ver…#404
ashokpariya0 wants to merge 1 commit intok8snetworkplumbingwg:masterfrom
ashokpariya0:bump-netlink-pkg

Conversation

@ashokpariya0
Copy link
Contributor

…sion

Update netlink dependency to the latest commit from main (v1.3.2-0.20260310143705-0fc897210fbd) to include upstream changes while waiting for the next official release.

request for new release created - vishvananda/netlink#1166

…sion

Update netlink dependency to the latest commit from main
(v1.3.2-0.20260310143705-0fc897210fbd) to include upstream changes
while waiting for the next official release.

Signed-off-by: Ashok Pariya <ashok.pariya@ibm.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the netlink Go module dependency to its latest pseudo-version. This change incorporates recent upstream fixes and improvements from the netlink library, ensuring the project benefits from the most current developments without waiting for an official release.

Highlights

  • Dependency Update: Updated the github.com/vishvananda/netlink Go module dependency to its latest pseudo-version from the main branch.
Changelog
  • go.mod
    • Updated github.com/vishvananda/netlink from v1.3.1 to v1.3.2-0.20260310143705-0fc897210fbd.
  • go.sum
    • Updated checksums for github.com/vishvananda/netlink.
    • Removed old golang.org/x/sys module entries.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request updates the github.com/vishvananda/netlink dependency to a newer pseudo-version. A review comment highlights a high-severity issue where the pseudo-version in go.mod contains an incorrect timestamp (2026 instead of 2024), which could lead to dependency resolution problems and requires correction, followed by running go mod tidy.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants