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

fix: ovsdb.GetOvsPortForContIface should not return error if iface not found #305

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

ykulazhenkov
Copy link
Contributor

@ykulazhenkov ykulazhenkov commented Apr 15, 2024

What this PR does / why we need it:
Currently, the function returns "", false, err if the interface is not found.
The function's signature and usage assume that the function should not return an error if the interface is not found.

portName, portFound, err := getOvsPortForContIface(ovsDriver, args.IfName, args.Netns)

Fix the function to return "", false, nil if the interface is not found.
This change fixes CmdDel for the scenario when It is called after a failed CmdAdd or when the port is manually removed from the ovs.
Special notes for your reviewer:

Release note:

"NONE"

cc @SchSeba @e0ne

Currently the function returns '"",false, err' in case if interface
not found.

The signature and usage of this function assume that the
function should not return and error in case if interface not
found.

Fix the function to return '"", false, nil' in case if the interface
not found.

This change fixes CmdDel for scenario when CmdDel is called
after failed CmdAdd or when port was manually removed from the ovs.

Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 15, 2024
@kubevirt-bot
Copy link
Collaborator

Hi @ykulazhenkov. Thanks for your PR.

I'm waiting for a k8snetworkplumbingwg member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@SchSeba
Copy link
Collaborator

SchSeba commented Apr 24, 2024

/ok-to-test

@kubevirt-bot kubevirt-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 24, 2024
@SchSeba
Copy link
Collaborator

SchSeba commented Apr 24, 2024

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2024
@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SchSeba, ykulazhenkov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2024
@SchSeba
Copy link
Collaborator

SchSeba commented Apr 24, 2024

/retest

@kubevirt-bot kubevirt-bot merged commit fb9f655 into k8snetworkplumbingwg:main Apr 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants