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] Add correlate fields and fix e2e tests with stats and network policy #1682

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

zyiou
Copy link
Contributor

@zyiou zyiou commented Dec 21, 2020

This PR is a follow-up fix for bumping go-ipfix to v0.4.2 with following changes:

  • add destinationServicePort, egressNetworkPolicyName and egressNetworkPolicyNamespace in correlation fields
  • add stats update function in flow-exporter without which the delta values are 0 (found in e2e tests)
  • add network policy testing for inter Node flows
  • fix bandwidth unit parsing problem

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. Thanks for root causing it quickly.
As I already have the PR to do the merging of upstream/feature/flow-aggregator with upstream/master, additional commits on upstream/feature/flow-aggregator mean more massaging on the local branch--I already have one local commit fixing the flakiness.
Can you merge it with master and include the network policies in interNodeFlows to check for fixed correlation? You should wait for my PR to get merged with the master.

@@ -273,6 +273,9 @@ func (exp *flowExporter) sendFlowRecords() error {
return err
}
}
if err := exp.flowRecords.ValidateAndUpdateStats(key, record); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Oh.. this was there before right? That is a good amount of logic missing :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea.. I missed this part when changing the code.

@codecov-io
Copy link

codecov-io commented Dec 21, 2020

Codecov Report

❗ No coverage uploaded for pull request base (feature/flow-aggregator@179a472). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                    Coverage Diff                     @@
##             feature/flow-aggregator    #1682   +/-   ##
==========================================================
  Coverage                           ?   40.34%           
==========================================================
  Files                              ?      107           
  Lines                              ?    13150           
  Branches                           ?        0           
==========================================================
  Hits                               ?     5306           
  Misses                             ?     7363           
  Partials                           ?      481           
Flag Coverage Δ
unit-tests 40.34% <0.00%> (?)

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

@zyiou
Copy link
Contributor Author

zyiou commented Dec 21, 2020

LGTM. Thanks for root causing it quickly.
As I already have the PR to do the merging of upstream/feature/flow-aggregator with upstream/master, additional commits on upstream/feature/flow-aggregator mean more massaging on the local branch--I already have one local commit fixing the flakiness.
Can you merge it with master and include the network policies in interNodeFlows to check for fixed correlation? Is that ok for you? You should wait for my PR to get merged with master.

Sure. will add the network policy changes in e2e tests.

@zyiou zyiou force-pushed the zyiou/test branch 6 times, most recently from 0de8880 to 6d41413 Compare December 21, 2020 22:05
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 - I assume we need to merge this before #1671?

@srikartati
Copy link
Member

srikartati commented Dec 21, 2020

LGTM - I assume we need to merge this before #1671?

This can go in after PR #1671. Bandwidth tests are being skipped with octetDeltaCount check and correlation of network policy fields is not being validated in current e2e tests. We need to validate those and check-in this change to master after merging PR #1671.

@antoninbas
Copy link
Contributor

antoninbas commented Dec 21, 2020

LGTM - I assume we need to merge this before #1671?

This can go in after PR #1671. Bandwidth tests are being skipped with octetDeltaCount check and correlation of network policy fields is not being validated in current e2e tests. We need to validate those and check-in this change to master after merging PR #1671.

If this PR fixes a bug in #1671, then we should amend #1671 with this commit (to avoid checking in broken code in master)

@zyiou
Copy link
Contributor Author

zyiou commented Dec 22, 2020

LGTM - I assume we need to merge this before #1671?

This can go in after PR #1671. Bandwidth tests are being skipped with octetDeltaCount check and correlation of network policy fields is not being validated in current e2e tests. We need to validate those and check-in this change to master after merging PR #1671.

If this PR fixes a bug in #1671, then we should amend #1671 with this commit (to avoid checking in broken code in master)

Sure. I will then rebase with flow/aggregator branch after I fix the e2e tests problem for bandwidth.

@zyiou zyiou changed the title [Flow-Aggregator]Add correlate fields and stats update method [Flow-Aggregator] Add correlate fields and fix e2e tests with stats and network policy Dec 22, 2020
@srikartati
Copy link
Member

Sure a couple of ways to go about this. I am updating the upstream/feature/flow-aggregator branch with my commits and new rebased master commits. We can push this commit and use PR #1671 to merge everything.

@srikartati srikartati force-pushed the feature/flow-aggregator branch from 179a472 to 92b6976 Compare December 22, 2020 03:46
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 merged commit a51e08d into antrea-io:feature/flow-aggregator Dec 22, 2020
@zyiou zyiou deleted the zyiou/test branch February 24, 2021 19:59
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.

5 participants