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

[Flow Aggregator] Remove originalExporterAddress and originalObservationDomainId #2361

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

zyiou
Copy link
Contributor

@zyiou zyiou commented Jul 7, 2021

This commit removes originalExporterIPv4Address, originalExporterIPv6Address and originalObservationDomainId from flow aggregator and related templates for these fields.
It also bumps go-ipfix to v0.5.4.

fixes #2336

@zyiou zyiou added the area/flow-visibility/aggregator Issues or PRs related to Flow Aggregator label Jul 7, 2021
@zyiou zyiou force-pushed the zyiou/template branch from fa27670 to b34f3de Compare July 7, 2021 18:40
@zyiou
Copy link
Contributor Author

zyiou commented Jul 7, 2021

/test-all
/test-ipv6-e2e

srikartati
srikartati previously approved these changes Jul 7, 2021
Copy link
Member

@srikartati srikartati left a comment

Choose a reason for hiding this comment

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

LGTM

@srikartati srikartati requested a review from antoninbas July 7, 2021 18:53
@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2021

Codecov Report

Merging #2361 (8ac82ee) into main (c1b932d) will increase coverage by 17.88%.
The diff coverage is 72.72%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2361       +/-   ##
===========================================
+ Coverage   41.89%   59.78%   +17.88%     
===========================================
  Files         145      283      +138     
  Lines       18072    22088     +4016     
===========================================
+ Hits         7572    13206     +5634     
+ Misses       9818     7474     -2344     
- Partials      682     1408      +726     
Flag Coverage Δ
e2e-tests ∅ <ø> (?)
kind-e2e-tests 47.27% <54.54%> (?)
unit-tests 41.89% <54.54%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
pkg/ipfix/ipfix_intermediate.go 88.23% <ø> (ø)
pkg/flowaggregator/flowaggregator.go 66.41% <72.72%> (+41.92%) ⬆️
pkg/apiserver/handlers/webhook/convert_crd.go 2.56% <0.00%> (ø)
pkg/apiserver/handlers/webhook/mutation_labels.go 24.71% <0.00%> (ø)
pkg/util/logdir/logdir.go 44.44% <0.00%> (ø)
pkg/agent/types/networkpolicy.go 83.33% <0.00%> (ø)
pkg/apis/stats/register.go 81.81% <0.00%> (ø)
pkg/agent/proxy/types/groupcounter.go 87.50% <0.00%> (ø)
pkg/apis/crd/v1alpha2/register.go 85.71% <0.00%> (ø)
pkg/agent/apiserver/handlers/errors.go 0.00% <0.00%> (ø)
... and 232 more

@zyiou zyiou added the area/flow-visibility Issues or PRs related to flow visibility support in Antrea label Jul 7, 2021
@zyiou zyiou force-pushed the zyiou/template branch from b34f3de to a4227aa Compare July 7, 2021 22:59
@zyiou
Copy link
Contributor Author

zyiou commented Jul 7, 2021

/test-all
/test-ipv6-e2e

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.

One question, otherwise LGTM

if fa.templateIDv4Expv6, err = fa.createAndSendTemplate(false, true); err != nil {
return err
}
if fa.templateIDv6Expv4, err = fa.createAndSendTemplate(true, false); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like even with 2 templates only, the helper function may still be a good idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

@zyiou zyiou force-pushed the zyiou/template branch from a4227aa to 87c3545 Compare July 8, 2021 04:09
@zyiou
Copy link
Contributor Author

zyiou commented Jul 8, 2021

/test-all
/test-ipv6-e2e

antoninbas
antoninbas previously approved these changes Jul 8, 2021
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

@antoninbas
Copy link
Contributor

@srikartati could you take another look at this?

// and original exporter IP could belong to different IP families.
if fa.templateIDv4Expv4, err = fa.createAndSendTemplate(false, false); err != nil {
// Currently, we send two templates for IPv4 and IPv6 regardless of the IP families supported by cluster
fa.createAndSendTemplate(true)
Copy link
Member

Choose a reason for hiding this comment

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

why does this need to be called two times? is this an expected line?

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 noticing this. This should be removed.

This commit removes originalExporterIPv4Address,
originalExporterIPv6Address and originalObservationDomainId from
flow aggregator and related templates for these fields.
It also bumps go-ipfix to v0.5.4.
fixes antrea-io#2336

Signed-off-by: zyiou <[email protected]>
@zyiou
Copy link
Contributor Author

zyiou commented Jul 8, 2021

/test-all
/test-ipv6-e2e

Copy link
Member

@srikartati srikartati left a comment

Choose a reason for hiding this comment

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

LGTM

@antoninbas
Copy link
Contributor

/test-ipv6-e2e

@zyiou
Copy link
Contributor Author

zyiou commented Jul 9, 2021

e2e test failed at TestFlowAggregator/IPv4/IntraNodeFlows on "E2e tests on a Kind cluster on Linux with Antrea-native policies disabled". Issue reported #2369 . The flakiness should not be introduced by this PR since it happens in other PRs too. Re-run e2e tests now.

@lzhecheng
Copy link
Contributor

/test-ipv6-e2e

@antoninbas antoninbas merged commit 4895f6a into antrea-io:main Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/flow-visibility/aggregator Issues or PRs related to Flow Aggregator area/flow-visibility Issues or PRs related to flow visibility support in Antrea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Original exporter IP in aggregated flow records is not Node IP
5 participants