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 issue in UDP/SCTP Service flow in Antrea Proxy #1398

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

wenyingd
Copy link
Contributor

  1. Set IP protocol number according to the Service protocol type in "learn" flow.
  2. Add integration test cases to ensure the flow is realized as expected.

Fixes #1395

@antrea-bot
Copy link
Collaborator

Thanks for your PR.
Unit tests and code linters are run automatically every time the PR is updated.
E2e, conformance and network policy tests can only be triggered by a member of the vmware-tanzu organization. Regular contributors to the project should join the org.

The following commands are available:

  • /test-e2e: to trigger e2e tests.
  • /skip-e2e: to skip e2e tests.
  • /test-conformance: to trigger conformance tests.
  • /skip-conformance: to skip conformance tests.
  • /test-whole-conformance: to trigger all conformance tests on linux.
  • /skip-whole-conformance: to skip all conformance tests on linux.
  • /test-networkpolicy: to trigger networkpolicy tests.
  • /skip-networkpolicy: to skip networkpolicy tests.
  • /test-windows-conformance: to trigger windows conformance tests.
  • /skip-windows-conformance: to skip windows conformance tests.
  • /test-windows-networkpolicy: to trigger windows networkpolicy tests.
  • /skip-windows-networkpolicy: to skip windows networkpolicy tests.
  • /test-hw-offload: to trigger ovs hardware offload test.
  • /skip-hw-offload: to skip ovs hardware offload test.
  • /test-all: to trigger all tests (except whole conformance).
  • /skip-all: to skip all tests (except whole conformance).

@codecov-io
Copy link

codecov-io commented Oct 16, 2020

Codecov Report

Merging #1398 into master will increase coverage by 0.10%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1398      +/-   ##
==========================================
+ Coverage   64.45%   64.55%   +0.10%     
==========================================
  Files         159      159              
  Lines       12664    12672       +8     
==========================================
+ Hits         8162     8181      +19     
+ Misses       3644     3641       -3     
+ Partials      858      850       -8     
Flag Coverage Δ
#integration-tests 47.54% <90.90%> (+2.58%) ⬆️
#kind-e2e-tests 50.25% <54.54%> (-0.43%) ⬇️
#unit-tests 42.13% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/ovs/openflow/ofctrl_action.go 91.21% <90.90%> (+1.37%) ⬆️
pkg/apis/controlplane/v1beta1/sets.go 36.76% <0.00%> (-7.36%) ⬇️
...ntroller/networkpolicy/networkpolicy_controller.go 65.92% <0.00%> (-2.23%) ⬇️
...ntroller/networkpolicy/networkpolicy_controller.go 80.83% <0.00%> (+0.26%) ⬆️
pkg/agent/openflow/pipeline.go 80.19% <0.00%> (+0.49%) ⬆️
pkg/ovs/openflow/ofctrl_builder.go 77.44% <0.00%> (+1.27%) ⬆️
pkg/ovs/openflow/ofctrl_bridge.go 71.93% <0.00%> (+1.58%) ⬆️
pkg/apiserver/certificate/certificate.go 77.63% <0.00%> (+6.57%) ⬆️
pkg/controller/networkpolicy/tier.go 100.00% <0.00%> (+10.00%) ⬆️

weiqiangt
weiqiangt previously approved these changes Oct 16, 2020
Copy link
Contributor

@weiqiangt weiqiangt left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it. LGTM.

test/integration/agent/openflow_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the quick fix and test

Comment on lines 595 to 598
for idx, ipByte := range ipBytes {
if ipByte < 16 && idx > 0 {
ipStr = fmt.Sprintf("%s0%x", ipStr, ipByte)
} else {
ipStr = fmt.Sprintf("%s%x", ipStr, ipByte)
}
}
return ipStr
Copy link
Contributor

Choose a reason for hiding this comment

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

I think return "0x" + hex.EncodeToString(ipBytes) will work?

https://play.golang.org/p/zQ79mNuNKgi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, updated.

test/integration/agent/openflow_test.go Outdated Show resolved Hide resolved
@wenyingd
Copy link
Contributor Author

/test-all

@lzhecheng
Copy link
Contributor

/test-e2e

@wenyingd
Copy link
Contributor Author

/test-conformance
/test-networkpolicy

tnqn
tnqn previously approved these changes Oct 19, 2020
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

a typo, otherwise LGTM

test/integration/agent/openflow_test.go Outdated Show resolved Hide resolved
1. Set IP protocol number according to the Service protocol type in "learn" flow.
2. Add integration test cases to ensure the flow is realized as expected.
@wenyingd
Copy link
Contributor Author

/test-all

@wenyingd wenyingd requested a review from tnqn October 20, 2020 01:28
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@wenyingd wenyingd merged commit e0743d3 into antrea-io:master Oct 20, 2020
antoninbas pushed a commit to antoninbas/antrea that referenced this pull request Nov 10, 2020
1. Set IP protocol number according to the Service protocol type in "learn" flow.
2. Add integration test cases to ensure the flow is realized as expected.
antoninbas pushed a commit that referenced this pull request Nov 11, 2020
1. Set IP protocol number according to the Service protocol type in "learn" flow.
2. Add integration test cases to ensure the flow is realized as expected.
@wenyingd wenyingd deleted the issue_1395 branch October 8, 2021 14:03
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.

SessionAffinity is broken for UDP/SCTP Services in Antrea Proxy
8 participants