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

Support AntreaNetworkPolicy reject action in Traceflow #2032

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

gran-vmv
Copy link
Contributor

@gran-vmv gran-vmv commented Apr 6, 2021

No description provided.

@gran-vmv gran-vmv added the status/WIP Work in progress label Apr 6, 2021
@codecov-io
Copy link

codecov-io commented Apr 6, 2021

Codecov Report

Merging #2032 (9b224bc) into main (4d92619) will increase coverage by 0.60%.
The diff coverage is 51.51%.

❗ Current head 9b224bc differs from pull request most recent head 37c1a53. Consider uploading reports for the commit 37c1a53 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2032      +/-   ##
==========================================
+ Coverage   60.78%   61.39%   +0.60%     
==========================================
  Files         269      269              
  Lines       20326    20846     +520     
==========================================
+ Hits        12356    12799     +443     
- Misses       6677     6738      +61     
- Partials     1293     1309      +16     
Flag Coverage Δ
e2e-tests 24.81% <0.00%> (?)
kind-e2e-tests 51.74% <60.71%> (+0.28%) ⬆️
unit-tests 41.53% <0.00%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
pkg/agent/controller/traceflow/packetin.go 44.83% <51.51%> (-11.86%) ⬇️
pkg/ovs/openflow/ofctrl_packetin.go 0.00% <0.00%> (-35.09%) ⬇️
pkg/ipfix/ipfix_process.go 81.81% <0.00%> (-18.19%) ⬇️
...agent/controller/traceflow/traceflow_controller.go 55.04% <0.00%> (-14.43%) ⬇️
pkg/agent/controller/networkpolicy/packetin.go 56.09% <0.00%> (-14.18%) ⬇️
pkg/controller/traceflow/controller.go 56.99% <0.00%> (-10.28%) ⬇️
...ntroller/networkpolicy/networkpolicy_controller.go 70.12% <0.00%> (-0.98%) ⬇️
pkg/agent/openflow/client.go 60.37% <0.00%> (+0.53%) ⬆️
pkg/agent/flowexporter/exporter/exporter.go 71.62% <0.00%> (+0.67%) ⬆️
... and 19 more

@gran-vmv gran-vmv force-pushed the tf-rej branch 2 times, most recently from b9370d0 to 0be85b0 Compare April 6, 2021 08:33
@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 6, 2021

/test-all
/test-ipv6-all
/test-ipv6-only-all

@gran-vmv gran-vmv force-pushed the tf-rej branch 5 times, most recently from 6b17484 to e4be8cf Compare April 7, 2021 06:34
@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 7, 2021

/test-all
/test-ipv6-all
/test-ipv6-only-all

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 7, 2021

/test-all
/test-ipv6-all
/test-ipv6-only-all

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 7, 2021

/test-hw-offload
/test-windows-e2e

@gran-vmv gran-vmv force-pushed the tf-rej branch 2 times, most recently from 08bd34f to 9b224bc Compare April 8, 2021 01:22
@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 8, 2021

/test-all
/test-ipv6-all
/test-ipv6-only-all
/test-hw-offload
/test-windows-e2e

@gran-vmv gran-vmv force-pushed the tf-rej branch 2 times, most recently from affa354 to 37c1a53 Compare April 8, 2021 06:27
@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 8, 2021

/test-all
/test-ipv6-all
/test-ipv6-only-all
/test-hw-offload
/test-windows-e2e

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 8, 2021

/test-ipv6-all
/test-ipv6-only-all

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 8, 2021

/test-windows-e2e
/test-windows-conformance
/test-windows-networkpolicy

@gran-vmv gran-vmv removed the status/WIP Work in progress label Apr 8, 2021
@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 8, 2021

/test-windows-networkpolicy
/test-windows-e2e
/test-networkpolicy
/test-ipv6-only-e2e
/test-ipv6-e2e
/test-conformance

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 8, 2021

/test-ipv6-only-conformance
/test-windows-e2e
/test-ipv6-only-e2e

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 9, 2021

/test-ipv6-only-conformance
/test-windows-e2e
/test-ipv6-only-e2e
/test-ipv6-e2e

@gran-vmv gran-vmv requested a review from luolanzone April 9, 2021 01:36
@lzhecheng
Copy link
Contributor

There's an "invalid memory address or nil pointer dereference" error for IPv6 tests. I think it is related to implementation.

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 9, 2021

There's an "invalid memory address or nil pointer dereference" error for IPv6 tests. I think it is related to implementation.

It's introduced by this change #2029 (review) . I'm discussing with Jianjun.

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 9, 2021

/test-ipv6-only-e2e

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 9, 2021

/test-ipv6-e2e
/test-windows-e2e

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 9, 2021

/test-all
/test-ipv6-all
/test-ipv6-only-all

@gran-vmv
Copy link
Contributor Author

gran-vmv commented Apr 9, 2021

/test-all-features-conformance
/test-ipv6-only-conformance

@gran-vmv gran-vmv force-pushed the tf-rej branch 2 times, most recently from 40dfdfa to d880fb5 Compare April 12, 2021 02:58
@gran-vmv
Copy link
Contributor Author

/test-all
/test-ipv6-all
/test-ipv6-only-all

@gran-vmv gran-vmv added this to the Antrea v1.1 release milestone Apr 12, 2021
@gran-vmv
Copy link
Contributor Author

/test-e2e
/test-ipv6-e2e
/test-ipv6-only-conformance
/test-windows-networkpolicy

@@ -51,6 +51,15 @@ const (
ActionForwardedOutOfOverlay TraceflowAction = "ForwardedOutOfOverlay"
)

type TraceflowRejectAction string

const (
Copy link
Contributor

Choose a reason for hiding this comment

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

But why we need to define reject actions? The behavior is fixed right - TPCis always reset, and others are always ICMPProhibited. In my mind, we just need a new TraceflowAction called ActionRejected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the "reject" implementation in Antrea, it is a "drop" action with responding specific message. Thus I use another "rejectAction" property to store this information, but I'm OK to discard this new property and use action=ActionRejected instead.
@tnqn @antoninbas Any comments?

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 we should drop it for now until we give users the ability to configure the reject action (if we ever do that...)

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. I dropped current design and use action=ActionRejected instead.

@gran-vmv
Copy link
Contributor Author

/test-e2e
/test-ipv6-e2e
/test-ipv6-only-conformance

@gran-vmv gran-vmv force-pushed the tf-rej branch 2 times, most recently from 16f1057 to e842ac9 Compare April 19, 2021 08:04
@gran-vmv
Copy link
Contributor Author

/test-all
/test-ipv6-all
/test-ipv6-only-all

Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

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

LGTM

@gran-vmv
Copy link
Contributor Author

/test-e2e
/test-ipv6-conformance
/test-ipv6-e2e
/test-ipv6-only-conformance
/test-ipv6-only-e2e
/test-windows-networkpolicy

@gran-vmv
Copy link
Contributor Author

/test-e2e
/test-ipv6-only-e2e

@gran-vmv
Copy link
Contributor Author

/test-e2e
/test-ipv6-e2e
/test-ipv6-only-conformance

@gran-vmv
Copy link
Contributor Author

Errors in jenkins-ipv6-ds-e2e and jenkins-ipv6-only-conformance are not related to this patch.

@gran-vmv gran-vmv merged commit c67106c into antrea-io:main Apr 21, 2021
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.

6 participants