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-1965: Initial intg with UDN interface mapping api #487

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

msherif1234
Copy link
Contributor

@msherif1234 msherif1234 commented Dec 14, 2024

Description

Dependencies

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).

@msherif1234 msherif1234 marked this pull request as draft December 14, 2024 14:48
@msherif1234 msherif1234 force-pushed the udn-mapping branch 6 times, most recently from 148c2ff to 41dd289 Compare December 19, 2024 17:10
@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 Dec 19, 2024
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:6d1822e

It will expire after two weeks.

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

USER=netobserv VERSION=6d1822e 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 Dec 19, 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 Dec 19, 2024
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:4319c79

It will expire after two weeks.

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

USER=netobserv VERSION=4319c79 make set-agent-image

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 28.40%. Comparing base (2c96c42) to head (64b226b).

Files with missing lines Patch % Lines
pkg/agent/agent.go 0.00% 1 Missing ⚠️
pkg/exporter/ipfix.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #487      +/-   ##
==========================================
+ Coverage   28.34%   28.40%   +0.06%     
==========================================
  Files          46       46              
  Lines        4741     4745       +4     
==========================================
+ Hits         1344     1348       +4     
  Misses       3295     3295              
  Partials      102      102              
Flag Coverage Δ
unittests 28.40% <81.81%> (+0.06%) ⬆️

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

Files with missing lines Coverage Δ
pkg/agent/config.go 8.33% <ø> (ø)
pkg/decode/decode_protobuf.go 30.52% <100.00%> (+0.40%) ⬆️
pkg/model/record.go 85.50% <100.00%> (+0.43%) ⬆️
pkg/agent/agent.go 31.09% <0.00%> (ø)
pkg/exporter/ipfix.go 0.00% <0.00%> (ø)

@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 Dec 19, 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 Dec 19, 2024
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:4599f62

It will expire after two weeks.

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

USER=netobserv VERSION=4599f62 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 Dec 19, 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 Dec 19, 2024
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:80a056e

It will expire after two weeks.

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

USER=netobserv VERSION=80a056e make set-agent-image

@msherif1234 msherif1234 changed the title WIP: Initial intg with UDN interface mapping api NETOBSERV-1965: Initial intg with UDN interface mapping api Jan 6, 2025
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jan 6, 2025

@msherif1234: This pull request references NETOBSERV-1965 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.19.0" version, but no target version was set.

In response to this:

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.

  • 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.

@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 Jan 20, 2025
@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 Jan 20, 2025
Copy link

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

It will expire after two weeks.

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

USER=netobserv VERSION=b7a449f 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 Jan 20, 2025
@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 Jan 20, 2025
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:096385d

It will expire after two weeks.

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

USER=netobserv VERSION=096385d 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 Jan 20, 2025
Copy link

openshift-ci bot commented Jan 21, 2025

@msherif1234: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/qe-e2e-tests 8c5d63c link false /test qe-e2e-tests

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Comment on lines +13 to +14
ovnmodel "github.com/ovn-org/ovn-kubernetes/go-controller/observability-lib/model"
ovnobserv "github.com/ovn-org/ovn-kubernetes/go-controller/observability-lib/sampledecoder"
Copy link
Member

Choose a reason for hiding this comment

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

I don't want to block this PR further, but I think we should get rid of these dependencies in our model package
So, no blocker - I suggest to add that to a follow-up task - possibly for 1.9.

An option could be to pass an interface, or callbacks, instead of the actual sampledecoder.
(Another option which we briefly discussed is to add a new stage instead of doing this decoration directly in Record, but I'm not sure it's any better)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah we can see how to clean this further in 1.9 I briefly looked at new stage but I quickly realized it adds some overhead and wasn't sure how to correctly wire things

if err != nil {
return IntfDirUdn{Interface: intf, Direction: dir, Udn: ""}
}
udnsCache = m
Copy link
Member

Choose a reason for hiding this comment

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

this cache is never updated? I can add that also as a follow-up if you want

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well the caches is reset every eviction then read from ovnk after that its just ready only no update is needed during the eviction processing

Copy link
Member

Choose a reason for hiding this comment

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

oh yes I didn't noticed in NewRecord

}
}

pbflowRecord.NetworkEventsMetadata = make([]*NetworkEvent, 0)
Copy link
Member

Choose a reason for hiding this comment

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

nit / follow-up: avoid creating NetworkEventsMetadata if fr.NetworkMonitorEventsMD is empty?

for _, intf := range fr.Interfaces {
directions = append(directions, intf.Direction)
interfaces = append(interfaces, intf.Interface)
if intf.Udn != "" {
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we append udns here, regardless of it's presence? It depends how this data is processed in the console plugin. If the udn array is correlated with the interface array, the indexes in udn array must match the one from the interfaces. Not totally sure about that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in the console side they are two separate list? u mean when user correlate between the two in the console ui they won't be in sync so maybe its better to show it regardless I will remove this check

Copy link
Member

@jotak jotak Jan 21, 2025

Choose a reason for hiding this comment

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

honestly I don't remember how it's done in the console plugin ... For interfaces and direction I know that we have a column that shows both "Interfaces and Directions" so the 2 arrays are correlated; but did we do something similar for udn, I'm not sure

Copy link
Contributor Author

@msherif1234 msherif1234 Jan 21, 2025

Choose a reason for hiding this comment

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

with my len check we get this
image

but w/o len check we will get n/a and xlat-test/test-network i.e 2 rows which might be better for readability because now u don't know this tag for which interface so I think better to show "" for ovn-udn1 interface

Copy link
Member

@jotak jotak 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 @msherif1234
So I created this follow-up for 1.9: https://issues.redhat.com/browse/NETOBSERV-2069 - we can continue discuss here and amend that story accordingly

Copy link
Member

@jotak jotak left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 21, 2025
@msherif1234
Copy link
Contributor Author

/approve

Copy link

openshift-ci bot commented Jan 21, 2025

[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 5110b52 into netobserv:main Jan 21, 2025
9 of 10 checks passed
@msherif1234 msherif1234 deleted the udn-mapping branch January 21, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants