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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

Copy link

openshift-ci bot commented Dec 14, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from msherif1234. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

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

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

It will expire after two weeks.

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

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

if v != "" {
entry.Udn = v
} else {
entry.Udn = "default-network"
Copy link
Member

Choose a reason for hiding this comment

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

Should we use here a name that we are sure cannot be used by the users? Or is "default-network" already a special name (ie. users cannot use that same name) ?
Maybe that would involve adding some special character that can't be retrieved in a udn name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it will ever conflict with udn tag it uses name/namespace syntax but I will double check with ovnk team to be sure

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.

just one question/remark, other than that lgtm

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

New image:
quay.io/netobserv/netobserv-ebpf-agent:7f0ede5

It will expire after two weeks.

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

USER=netobserv VERSION=7f0ede5 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 16, 2025
Signed-off-by: Mohamed Mahmoud <[email protected]>
@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 16, 2025
@msherif1234 msherif1234 requested a review from jotak January 16, 2025 20:46
Copy link

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

It will expire after two weeks.

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

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

Copy link

openshift-ci bot commented Jan 17, 2025

@msherif1234: The following tests 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/images 0870aa9 link true /test images
ci/prow/qe-e2e-tests 0870aa9 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.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jan 17, 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

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.

@@ -56,6 +56,7 @@ func TestConversions(t *testing.T) {
},
},
Interfaces: []model.IntfDir{model.NewIntfDir("eth0", model.DirectionEgress)},
UdnList: []string{""},
Copy link
Member

Choose a reason for hiding this comment

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

could you add some non-empty data in some of the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure will do

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 actually this will require mock to ovnk decoded to return back strings

})
Udn: "",
}
if s != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Doing this in protobuf decode will cause the same issue as what I mentioned here: #286 (review)
.. and which made us having this bug: https://issues.redhat.com/browse/NETOBSERV-2009
I think it doesn't make sense to have any enrichment set in protobuf decode. There should be in a common path, not something that may end up not being invoked. IMO we should fix that in a first place rather than adding technical debt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think adding new pipeline might be very risk at this stage given the unstability e have can this be deferred to 1.9 ?

Copy link
Member

Choose a reason for hiding this comment

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

An option could be to create a new stage (like in this area), or perhaps inject some enrichment callback directly in NewRecord like it's done for interfaceNamer, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

We should fix NETOBSERV-2009 in 1.8 so if we fix it for events we could surely fix it as well for udns?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we still in TP for network events so no urgency for CLI support I think for 1.8 I will try to explode the new stage option

Udn: "",
}
if s != nil {
m, err := s.GetInterfaceUDNs()
Copy link
Member

@jotak jotak Jan 17, 2025

Choose a reason for hiding this comment

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

Looking at the ovn code, it seems like s.GetInterfaceUDNs() doesn't just returned some cached thing, it calls d.ovsdbClient.List(context.Background(), &ifaces) under the hood, which may involve some i/o ? That would be nice to double check. I think it's better at the very least to move this call out of the interface for loop, but even better, it could be fetched just once for the whole eviction loop or a different place ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants