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

Provides a possible way to set interface's type of one port #252

Merged
merged 2 commits into from
Jan 3, 2023

Conversation

wangyueyu64
Copy link
Contributor

In the current code, only the 'internal' type which is also the defaut type of interface is available when ovs-cni create one interface for port.
I added extra content to provides a possible way of setting interface's type when cni call func 'attachIfaceToBridge’.
In order to accommodate this function, also expanded type NetConf for ovs-cni and added extra arguments to function ‘attachIfaceToBridge'.
This will allow the user to select a custom type of interface when creating a port on bridge.

Signed-off-by: wangyueyu wangyueyu@didiglobal.com

What this PR does / why we need it:

Special notes for your reviewer:

Release note:


@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 10, 2022
@kubevirt-bot
Copy link
Collaborator

Hi @wangyueyu64. 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.

Copy link
Member

@phoracek phoracek left a comment

Choose a reason for hiding this comment

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

The code looks fine. Would you please add test cases to https://github.com/k8snetworkplumbingwg/ovs-cni/blob/main/pkg/plugin/plugin_test.go covering the default type (without interface_type passed) and one for a custom type?

@wangyueyu64
Copy link
Contributor Author

The code looks fine. Would you please add test cases to https://github.com/k8snetworkplumbingwg/ovs-cni/blob/main/pkg/plugin/plugin_test.go covering the default type (without interface_type passed) and one for a custom type?

Thank you for your reply. I will supplement the test content as soon as possible.

@wangyueyu64
Copy link
Contributor Author

The code looks fine. Would you please add test cases to https://github.com/k8snetworkplumbingwg/ovs-cni/blob/main/pkg/plugin/plugin_test.go covering the default type (without interface_type passed) and one for a custom type?

Add new test content for interface type.

@phoracek
Copy link
Member

/test pull-e2e-ovs-cni

@phoracek
Copy link
Member

phoracek commented Nov 25, 2022

The test fails on the CI, probably due to afxdp support not being present in a default installation of OVS. I tried it locally and it also failed. Reading https://docs.openvswitch.org/en/latest/intro/install/afxdp/, it mentions that this specific type is experimental and compiled by default.

Could we change the type used in tests to one that is generally supported? To make sure that these tests can be executed on regular environments of other developers. system type may be a good choice. Edit: Even though, for system you may need to create a dummy interface first. So perhaps we could use TAP?

@phoracek
Copy link
Member

@wangyueyu64 hello, this has been silent for a while. Can I help with anything regarding the tests?

@wangyueyu64
Copy link
Contributor Author

wangyueyu64 commented Dec 16, 2022 via email

@phoracek
Copy link
Member

That's all good, don't worry about that :)

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 16, 2022
wangyueyu added 2 commits December 26, 2022 10:52
…call func 'attachIfaceToBridge’.In order to accommodate this function, also expanded type NetConf for ovs-cni.The availability of the afxdp type interface has been verified.

Signed-off-by: wangyueyu <wangyueyu@didiglobal.com>
Signed-off-by: wangyueyu <wangyueyu@didiglobal.com>
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 26, 2022
@wangyueyu64
Copy link
Contributor Author

wangyueyu64 commented Dec 26, 2022

The afxdp type interface content in the test file has been replaced with the interface of type system.

@wangyueyu64 wangyueyu64 reopened this Dec 26, 2022
@phoracek
Copy link
Member

phoracek commented Jan 2, 2023

/retest

Copy link
Member

@phoracek phoracek left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks!

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2023
@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: phoracek, wangyueyu64

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 Jan 3, 2023
@phoracek
Copy link
Member

phoracek commented Jan 3, 2023

/release-note-none

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 3, 2023
@kubevirt-bot kubevirt-bot merged commit 9b91227 into k8snetworkplumbingwg:main Jan 3, 2023
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. needs-ok-to-test Indicates a PR that requires an org member to verify it 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