-
Notifications
You must be signed in to change notification settings - Fork 24
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
NETOBSERV-1566: ipfix: make RTT optional #630
Conversation
@jotak: This pull request references NETOBSERV-1566 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
5c1739a
to
1a3119a
Compare
@jotak: This pull request references NETOBSERV-1566 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
"flowDirection": { | ||
Key: "IfDirections", | ||
Setter: func(elt entities.InfoElementWithValue, rec any) { | ||
if dirs, ok := rec.([]int); ok && len(dirs) > 0 { | ||
elt.SetUnsigned8Value(uint8(dirs[0])) | ||
} | ||
}, | ||
Matcher: func(elt entities.InfoElementWithValue, expected any) bool { | ||
ifdirs := expected.([]int) | ||
return int(elt.GetUnsigned8Value()) == ifdirs[0] | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to manage reinterpret direction here ?
We could check for FlowDirection
field first and fallback on IfDirections
if not found for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But our agent always provides IfDirections
, right? Or there are cases where it would fail?
Like you said here #630 (comment) ideally the mapping should be configurable, but that's a quite bigger refactoring. Until we do that, I'd prefer to stick with what the agent does to keep it simple .. does it make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The agent always provide IfDirections
using gRPC, it doesn't when using IPFIX.
FLP can ingest IPFIX from eBPF or external source, in these cases we don't have this IfDirections
field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that's not something we cover today, to have the agent sending IPFIX flows to FLP. Just to make sure I did a try, and it seems far from working (cf #632). This whole exporter implementation is currently very tied to the usage via the operator, for instance with a lot of assumptions about the types in the generic map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get rid of that part then:
https://github.com/netobserv/netobserv-ebpf-agent/tree/main/e2e/ipfix
default: | ||
assert.Fail(t, "missing check on element", element.GetName()) | ||
name := element.GetName() | ||
mapping, ok := write.MapIPFIXKeys[name] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the end, should this be configurable ?
I feel the hardcoded mapping makes it really specific to our usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, it should read some of the mapping from the k8s rules config, but I wasn't up for doing this refactoring just for this little bug fix :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure let's just add a TODO here and maybe create a JIRA task if it's relevent for us
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we will ever need that in the operator, it's unlikely that we use different mechanisms to get agent's flows imho; so I opened an upstream issue: #632
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #630 +/- ##
==========================================
+ Coverage 67.05% 67.44% +0.38%
==========================================
Files 110 110
Lines 7677 7633 -44
==========================================
Hits 5148 5148
+ Misses 2217 2173 -44
Partials 312 312
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/ok-to-test |
New image: It will expire after two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=a2b8863 make set-flp-image |
@jotak The export is still failing with ipfix collextor pod showing logs |
@Amoghrd I tried using another FLP instance deployed as a collector and I don't see any error. I'm wondering if this could be due to your collector. FWIW we can also use a custom FLP deployment to ingest IPFIX (with a workflow like: |
Yeah this template was built with @jpinsonneau help. He had mentioned that a custom image was built to cater to the needs of the IBM folks as far as I remember. But yeah for all IPFIX export testing we have been using this YAML. @jpinsonneau Could you confirm if we should move away from this YAML and use @jotak suggestion of a custom FLP deployment? |
Tried the FLP collector and it worked fine. |
@jotak: This pull request references NETOBSERV-1566 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
- refactor IPFIX fields mapping / definition - allow optional fields - add interfaces and directions (plural) fields to IPFIX template - add tests for partial records & non-enriched records
cef7921
to
c57a686
Compare
New changes are detected. LGTM label has been removed. |
(rebased) |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jotak 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 |
Description
Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.