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

Remove interface name from alt name if exist #292

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

SchSeba
Copy link
Collaborator

@SchSeba SchSeba commented Feb 22, 2024

Fixes: #250

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
@SchSeba SchSeba force-pushed the support_alt_name branch 3 times, most recently from e438904 to 12edd61 Compare February 25, 2024 12:07
@coveralls
Copy link

coveralls commented Feb 25, 2024

Pull Request Test Coverage Report for Build 8220774282

Details

  • 26 of 48 (54.17%) changed or added relevant lines in 4 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 46.154%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/utils/mocks/netlink_manager_mock.go 9 11 81.82%
pkg/utils/netlink_manager.go 0 3 0.0%
pkg/sriov/sriov.go 17 21 80.95%
pkg/sriov/mocks/pci_utils_mock.go 0 13 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/utils/mocks/netlink_manager_mock.go 1 84.93%
pkg/sriov/mocks/pci_utils_mock.go 1 12.16%
Totals Coverage Status
Change from base Build 8189210689: 0.2%
Covered Lines: 582
Relevant Lines: 1261

💛 - Coveralls

@SchSeba
Copy link
Collaborator Author

SchSeba commented Feb 25, 2024

@adrianchiris @zeeke please take a look :)

"tempName", tempName)
linkObj, err = s.nLink.LinkByName(tempName)
if err != nil {
return fmt.Errorf("error getting VF netdevice with name %s", tempName)
Copy link
Member

Choose a reason for hiding this comment

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

wrap the original error

Suggested change
return fmt.Errorf("error getting VF netdevice with name %s", tempName)
return fmt.Errorf("error getting VF netdevice with name %s: %w", tempName, err)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done thanks! :)

@zeeke
Copy link
Member

zeeke commented Mar 6, 2024

Only one minor comment. PR looks good to me

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
@SchSeba
Copy link
Collaborator Author

SchSeba commented Mar 10, 2024

Thanks @zeeke done

@SchSeba
Copy link
Collaborator Author

SchSeba commented Mar 12, 2024

Hi @zeeke @e0ne @Eoghan1232 when the time allows please review this PR thanks :)

@Eoghan1232
Copy link
Collaborator

Hi @SchSeba I am okay with the change, but not sure why it's an issue.
for example, other cni's use alt-name as a way to restore the original VF name
I think host-device cni uses this logic
I know sriov-cni caches the cmdAdd anyways, so we can restore from cache, thus I am okay with this change.

@SchSeba
Copy link
Collaborator Author

SchSeba commented Mar 12, 2024

@Eoghan1232 thanks for the comment!

the reason we need this change (it's better explained in the issue) is that we are not able to return the vf to the host network namespace with is original name because it contains the same name in alt-name.

btw if host-cni use this feature it also needs to remove the alt-name before it restore it or it will not work

@Eoghan1232
Copy link
Collaborator

thanks for the info.
I'm happy for the merge :)

Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

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

LGTM

@zeeke zeeke merged commit 14fbf4a into k8snetworkplumbingwg:master Mar 12, 2024
10 of 11 checks passed
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.

sriov-cni del doesn't work when there is altName on the interace
4 participants