-
Notifications
You must be signed in to change notification settings - Fork 31
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-1283: Make ifaces watcher netns aware #171
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
==========================================
- Coverage 38.60% 38.58% -0.02%
==========================================
Files 31 31
Lines 2259 2340 +81
==========================================
+ Hits 872 903 +31
- Misses 1338 1383 +45
- Partials 49 54 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here. |
/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=a960c44 make set-agent-image |
/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=e401fa0 make set-agent-image |
@msherif1234: This pull request references Jira Issue OCPBUGS-17785, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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 kubernetes/test-infra repository. |
/jira refresh |
@msherif1234: This pull request references Jira Issue OCPBUGS-17785, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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 kubernetes/test-infra repository. |
/ok-to-test |
1 similar comment
/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=e26f1d5 make set-agent-image |
/ok-to-test |
1 similar comment
/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=652a4b6 make set-agent-image |
@msherif1234: This pull request references Jira Issue OCPBUGS-17785, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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 kubernetes/test-infra repository. |
if link.Flags&(syscall.IFF_UP|syscall.IFF_RUNNING) != 0 { | ||
iface := Interface{Name: attrs.Name, Index: attrs.Index, NetNS: netnsHandle} | ||
w.mutex.Lock() | ||
if link.Flags&(syscall.IFF_UP|syscall.IFF_RUNNING) != 0 && attrs.OperState == netlink.OperUp { |
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.
For the record attrs.OperState == netlink.OperUp
is needed to avoid calling EventAdded
too soon since it will come up with OperState
set to Down
first.
pkg/ifaces/watcher.go
Outdated
|
||
func getNetNSHandles(ctx context.Context) ([]netns.NsHandle, error) { | ||
log := logrus.WithField("component", "ifaces.Watcher") | ||
out, err := exec.CommandContext(ctx, "ls", "-lt", "/var/run/netns/").Output() |
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.
Can we use proper golang functions for this instead of exec.CommandContext
? Maybe ioutil.ReadDir
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.
good point swtiched to os.ReadDir()
Thanks!!
Added a small comment. Otherwise LGTM |
Signed-off-by: msherif1234 <mmahmoud@redhat.com>
Signed-off-by: msherif1234 <mmahmoud@redhat.com>
2b45e2f
to
cfeb767
Compare
/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=2ef08da make set-agent-image |
/lgtm |
@memodi can u pls do sanity check for this PR with the operator netobserv/network-observability-operator#406 we agreed to make sure it doesn't introduce regression and sriov testing can be done after the merge |
@msherif1234: This pull request references Jira Issue OCPBUGS-17785, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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 kubernetes/test-infra repository. |
@msherif1234: This pull request references NETOBSERV-1283 which is a valid jira issue. 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 kubernetes/test-infra repository. |
SRIOV testing passed, currently running select e2e regression tests with Operator PR netobserv/network-observability-operator#406 |
/label qe-approved |
thanks @msherif1234 @bn222 @memodi ! |
[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 |
today netobserv agent only subscribe to watch interface in default netns
for PODs with VF SRIOV interfaces they only show in custom netns made them invisible to network observability to fix this netobserv agent interface manager component needs to netns aware
needs netobserv/network-observability-operator#406 to setup netns mount