Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive link type from PF if the interface name is not available #479

Merged

Conversation

almaslennikov
Copy link
Contributor

in case a workload is already consuming a VF and sriov-device-plugin is restarted, when this selector is specified, the device plugin will fail to get the VF link type since getting this information requires the VF netdev. The netdev does not exist in the host namespace as its assigned to pod. This causes sriov-network-device-plugin to fail adding this VF to resource pool causing it to report the wrong number of resources.

To fix this, derive the link type of the device from its PF, if the netdev itself is not available.

@coveralls
Copy link
Collaborator

coveralls commented Apr 13, 2023

Pull Request Test Coverage Report for Build 4858418589

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 78.339%

Totals Coverage Status
Change from base Build 4779033466: 0.04%
Covered Lines: 1924
Relevant Lines: 2456

💛 - Coveralls

@adrianchiris
Copy link
Contributor

/test-all

1 similar comment
@adrianchiris
Copy link
Contributor

/test-all

@almaslennikov almaslennikov force-pushed the derive-link-type-from-pf branch 3 times, most recently from 323abb5 to f104700 Compare May 2, 2023 06:49
In case a workload is already consuming a VF and
sriov-device-plugin is restarted,
when this selector is specified, the device plugin will fail
to get the VF link type since getting this information
requires the VF netdev. The netdev does not exist in the host namespace
as its assigned to pod. this causes sriov-network-device-plugin to fail
adding this VF to resource pool,
causing it to report the wrong number of resources.

To fix this, derive the link type of the device from its PF,
if the netdev itself is not available.

Signed-off-by: amaslennikov <amaslennikov@nvidia.com>
Copy link
Contributor

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

Thx for working on it @almaslennikov ! LGTM

@SchSeba SchSeba merged commit 8ec9db3 into k8snetworkplumbingwg:master May 9, 2023
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.

5 participants