Skip to content

Remove LocalManager.host parameter from gadget execution to fix host detection#732

Open
matthyx wants to merge 1 commit intomainfrom
localmanager-fix
Open

Remove LocalManager.host parameter from gadget execution to fix host detection#732
matthyx wants to merge 1 commit intomainfrom
localmanager-fix

Conversation

@matthyx
Copy link
Contributor

@matthyx matthyx commented Feb 28, 2026

Summary by CodeRabbit

  • Refactor
    • Simplified runtime parameter configuration across multiple tracer implementations, removing environment-specific settings to streamline gadget initialization across process monitoring, network tracing, file operation tracking, and system call analysis features.

…detection

Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 107f7a4 and 8799621.

📒 Files selected for processing (18)
  • pkg/containerwatcher/v2/tracers/bpf.go
  • pkg/containerwatcher/v2/tracers/capabilities.go
  • pkg/containerwatcher/v2/tracers/dns.go
  • pkg/containerwatcher/v2/tracers/exec.go
  • pkg/containerwatcher/v2/tracers/exit.go
  • pkg/containerwatcher/v2/tracers/fork.go
  • pkg/containerwatcher/v2/tracers/hardlink.go
  • pkg/containerwatcher/v2/tracers/http.go
  • pkg/containerwatcher/v2/tracers/iouring.go
  • pkg/containerwatcher/v2/tracers/kmod.go
  • pkg/containerwatcher/v2/tracers/network.go
  • pkg/containerwatcher/v2/tracers/open.go
  • pkg/containerwatcher/v2/tracers/ptrace.go
  • pkg/containerwatcher/v2/tracers/randomx.go
  • pkg/containerwatcher/v2/tracers/ssh.go
  • pkg/containerwatcher/v2/tracers/symlink.go
  • pkg/containerwatcher/v2/tracers/syscall.go
  • pkg/containerwatcher/v2/tracers/unshare.go
💤 Files with no reviewable changes (2)
  • pkg/containerwatcher/v2/tracers/syscall.go
  • pkg/containerwatcher/v2/tracers/capabilities.go

📝 Walkthrough

Walkthrough

This PR removes the local manager-specific configuration parameter ("operator.LocalManager.host": "true") from gadget invocations across 18 tracer implementations in the containerwatcher package. Some tracers now pass nil for parameters entirely, while others retain parameter maps but omit the LocalManager entry. No logic or error handling changes are introduced.

Changes

Cohort / File(s) Summary
Complete params removal
pkg/containerwatcher/v2/tracers/bpf.go, exit.go, fork.go, hardlink.go, http.go, iouring.go, kmod.go, ptrace.go, randomx.go, ssh.go, symlink.go, unshare.go
Replaced gadget parameter maps with nil, removing LocalManager host configuration entirely from RunGadget invocations.
Params reduction
pkg/containerwatcher/v2/tracers/capabilities.go, dns.go, exec.go, network.go, open.go, syscall.go
Removed "operator.LocalManager.host": "true" entry while retaining other parameters like "operator.oci.ebpf.paths" in the gadget runtime configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Whiskers twitch, parameters gone,
LocalManager flags fade away,
Nil and clean, the gadgets run on,
Simpler configs lead the way!
Eighteen tracers in harmony sway. 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: removing the LocalManager.host parameter from gadget execution to fix host detection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch localmanager-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant