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

tetra: Fix tetra debug progs fail #3235

Merged
merged 5 commits into from
Dec 20, 2024
Merged

tetra: Fix tetra debug progs fail #3235

merged 5 commits into from
Dec 20, 2024

Conversation

olsajiri
Copy link
Contributor

Recent ebpf changes make ebpf.LoadPinnedProgram fail on opening link path. We want to open only programs, so failing on opening links/maps is fine ad we just want to continue scanning.

Fixes: #3234

Copy link

netlify bot commented Dec 17, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 4db3ec2
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/6764195fbaa6b00008b8e3ac
😎 Deploy Preview https://deploy-preview-3235--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@olsajiri olsajiri added the release-note/minor This PR introduces a minor user-visible change label Dec 17, 2024
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

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

fyi:

if strings.HasSuffix(path, "link") {
return nil // skip BPF links, they make the syscall fail since cilium/ebpf@78074c59
}
prog, err := ebpf.LoadPinnedProgram(path, nil)
if err != nil {
return fmt.Errorf("failed to load pinned object %q: %w", path, err)
}

Commit: ca9aaa0

@mtardy
Copy link
Member

mtardy commented Dec 17, 2024

Also added in the meantime, something we could actually use to do thing properly cilium/ebpf#1626.

@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch 5 times, most recently from 8954c06 to 0b460c2 Compare December 18, 2024 09:46
@olsajiri olsajiri marked this pull request as ready for review December 18, 2024 13:22
@olsajiri olsajiri requested a review from a team as a code owner December 18, 2024 13:22
@olsajiri olsajiri requested a review from jrfastab December 18, 2024 13:22
Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

LGTM. Left some comments. Let me know what you think.

Thanks!

Recent ebpf changes make ebpf.LoadPinnedProgram fail on opening
link path. We want to open only programs, so failing on opening
links/maps is fine ad we just want to continue scanning.

Enforcing leading '/' and adding '/link_override' suffix.

Fixes: #3234
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Copy link
Contributor

@kkourt kkourt 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.

Adding support to detect bpffs mount so we don't need
to specify --bpf-dir when running on top of k8s.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding support to detect lib directory so we don't need
to specify --bpf-lib when running on top of k8s.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Detect available terminal lines and print only output
that fits on terminal.

This is enabled only when in periodical output with
cleared screen.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
With the new auto detect values.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
@olsajiri olsajiri merged commit de2b126 into main Dec 20, 2024
42 checks passed
@olsajiri olsajiri deleted the pr/olsajiri/fixes branch December 20, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tetra debug progs bug
3 participants