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

NETOBSERV-1617: reuse flow filter capability with pcap feature #359

Merged

Conversation

msherif1234
Copy link
Contributor

Description

  • rename all flow filters to just filter to allow reuse the same configs
  • modify pca to use filter config
  • update userspace, examples and doc

NOO and CLI repos need to be updated with the renamed configs

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.

  • Will this change affect NetObserv / Network Observability operator? If not, you can ignore the rest of this checklist.
  • 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):
    • 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).

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jun 26, 2024

@msherif1234: This pull request references NETOBSERV-1617 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 story to target the "4.17.0" version, but no target version was set.

In response to this:

Description

  • rename all flow filters to just filter to allow reuse the same configs
  • modify pca to use filter config
  • update userspace, examples and doc

NOO and CLI repos need to be updated with the renamed configs

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.

  • Will this change affect NetObserv / Network Observability operator? If not, you can ignore the rest of this checklist.
  • 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):
  • 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. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 19.75309% with 65 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@58e5d37). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #359   +/-   ##
=======================================
  Coverage        ?   33.13%           
=======================================
  Files           ?       48           
  Lines           ?     3543           
  Branches        ?        0           
=======================================
  Hits            ?     1174           
  Misses          ?     2267           
  Partials        ?      102           
Flag Coverage Δ
unittests 33.13% <19.75%> (?)

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

Files Coverage Δ
pkg/agent/config.go 10.00% <ø> (ø)
pkg/ebpf/bpf_x86_bpfel.go 0.00% <ø> (ø)
pkg/agent/agent.go 35.97% <0.00%> (ø)
pkg/ebpf/flow_filter.go 44.06% <48.48%> (ø)
pkg/ebpf/tracer.go 0.00% <0.00%> (ø)
pkg/agent/packets_agent.go 0.00% <0.00%> (ø)

Comment on lines -57 to -59
if config.PCAFilters == "" {
logrus.Info("[PCA] NetObserv eBPF Agent instantiated without filters to identify packets. All packets will be captured. This might cause reduced performance.")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need a warning here in case filters are too wide ?

Copy link
Contributor Author

@msherif1234 msherif1234 Jun 27, 2024

Choose a reason for hiding this comment

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

That filter doesn’t exist anymore our option is the doc this as warning, plus if someone wanted to redirect all traffic to pcap probably they aren't looking for performance at this point

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah we need to be explicit in the doc about perf impact and implement a safe guard in case the CLI collector is getting too much data.

@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jun 27, 2024
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:f525832

It will expire after two weeks.

To deploy this build, run from the operator repo, assuming the operator is running:

USER=netobserv VERSION=f525832 make set-agent-image

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jun 28, 2024
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jun 28, 2024
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:82edc9f

It will expire after two weeks.

To deploy this build, run from the operator repo, assuming the operator is running:

USER=netobserv VERSION=82edc9f make set-agent-image

rename all flow filters to just filter to allow reuse the same configs
modify pca to use filter config
update userspace, examples and doc

Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jun 28, 2024
@openshift-ci openshift-ci bot added the lgtm label Jun 28, 2024
@msherif1234 msherif1234 added the no-qe This PR doesn't necessitate QE approval label Jun 28, 2024
Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
Copy link

openshift-ci bot commented Jun 28, 2024

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm label Jun 28, 2024
@msherif1234
Copy link
Contributor Author

/approve

Copy link

openshift-ci bot commented Jun 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msherif1234

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 8a6d8ce into netobserv:main Jun 28, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved jira/valid-reference lgtm no-qe This PR doesn't necessitate QE approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants