netobserv / flowlogs-pipeline

Transform flow logs into metrics
Apache License 2.0
75 stars 23 forks source link

NETOBSERV-1566: ipfix: make RTT optional #630

Closed jotak closed 6 months ago

jotak commented 6 months ago

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.

openshift-ci-robot commented 6 months ago

@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](https://github.com/netobserv/flowlogs-pipeline/pull/630): >## Description > >- refactor IPFIX fields mapping / definition >- allow optional fields >- add tests for partial records & non-enriched records > > > >## 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. > >* [x] Will this change affect NetObserv / Network Observability operator? If not, you can ignore the rest of this checklist. >* [x] Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix _(in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes)._ >* [ ] Does this PR require product documentation? > * [ ] If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs. >* [ ] Does this PR require a product release notes entry? > * [ ] If so, fill in "Release Note Text" in the JIRA. >* [ ] Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc. > * [ ] If so, make sure it is described in the JIRA ticket. >* QE requirements (check 1 from the list): > * [x] Standard QE validation, with pre-merge tests unless stated otherwise. > * [ ] Regression tests only (e.g. refactoring with no user-facing change). > * [ ] No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team). > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=netobserv%2Fflowlogs-pipeline). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 6 months ago

@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](https://github.com/netobserv/flowlogs-pipeline/pull/630): >## Description > >- 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 > > > >## 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. > >* [x] Will this change affect NetObserv / Network Observability operator? If not, you can ignore the rest of this checklist. >* [x] Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix _(in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes)._ >* [ ] Does this PR require product documentation? > * [ ] If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs. >* [ ] Does this PR require a product release notes entry? > * [ ] If so, fill in "Release Note Text" in the JIRA. >* [ ] Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc. > * [ ] If so, make sure it is described in the JIRA ticket. >* QE requirements (check 1 from the list): > * [x] Standard QE validation, with pre-merge tests unless stated otherwise. > * [ ] Regression tests only (e.g. refactoring with no user-facing change). > * [ ] No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team). > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=netobserv%2Fflowlogs-pipeline). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 113 lines in your changes are missing coverage. Please review.

Project coverage is 67.44%. Comparing base (fee143f) to head (c57a686).

Files Patch % Lines
pkg/pipeline/write/write_ipfix.go 0.00% 113 Missing :warning:
Additional details and impacted files ```diff @@ 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 ``` | [Flag](https://app.codecov.io/gh/netobserv/flowlogs-pipeline/pull/630/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/netobserv/flowlogs-pipeline/pull/630/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv) | `67.44% <0.00%> (+0.38%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Amoghrd commented 6 months ago

/ok-to-test

github-actions[bot] commented 6 months ago

New image: quay.io/netobserv/flowlogs-pipeline:a2b8863

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
Amoghrd commented 6 months ago

@jotak The export is still failing with ipfix collextor pod showing logs E0313 17:46:49.328657 1 tcp.go:87] error in decoding message: template 256 with obsDomainID 1 does not exist E0313 17:46:49.328693 1 tcp.go:87] error in decoding message: template 256 with obsDomainID 1 does not exist E0313 17:46:49.328717 1 tcp.go:87] error in decoding message: template 256 with obsDomainID 1 does not exist E0313 17:46:49.328860 1 tcp.go:87] error in decoding message: template 256 with obsDomainID 1 does not exist

jotak commented 6 months ago

@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. Do you know what exactly is this, that you're using: https://github.com/Amoghrd/go-ipfix/blob/custom-image/build/yamls/ipfix-collector.yaml#L50-L54 ? Is it pre-setting some IPFIX template? That could be the cause of the issue, whener new fields are added to our template, if you force a pre-registered template. cc @jpinsonneau do you know? (since it seems you created this custom image)

FWIW we can also use a custom FLP deployment to ingest IPFIX (with a workflow like: agent -> usual netobserv' FLP + IPFIX exporter -> Custom FLP) See my PR https://github.com/netobserv/flowlogs-pipeline/pull/633 for such as deployment

Amoghrd commented 6 months ago

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?

Amoghrd commented 6 months ago

Tried the FLP collector and it worked fine. /label qe-approved

openshift-ci-robot commented 6 months ago

@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](https://github.com/netobserv/flowlogs-pipeline/pull/630): >## Description > >- 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 > > > >## 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. > >* [x] Will this change affect NetObserv / Network Observability operator? If not, you can ignore the rest of this checklist. >* [x] Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix _(in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes)._ >* [ ] Does this PR require product documentation? > * [ ] If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs. >* [ ] Does this PR require a product release notes entry? > * [ ] If so, fill in "Release Note Text" in the JIRA. >* [ ] Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc. > * [ ] If so, make sure it is described in the JIRA ticket. >* QE requirements (check 1 from the list): > * [x] Standard QE validation, with pre-merge tests unless stated otherwise. > * [ ] Regression tests only (e.g. refactoring with no user-facing change). > * [ ] No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team). > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=netobserv%2Fflowlogs-pipeline). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 6 months ago

New changes are detected. LGTM label has been removed.

jotak commented 6 months ago

(rebased)

jotak commented 6 months ago

/approve

openshift-ci[bot] commented 6 months ago

[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: - ~~[OWNERS](https://github.com/netobserv/flowlogs-pipeline/blob/main/OWNERS)~~ [jotak] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment