feat(build): ship netprobe systemd-service unit in the add-on bundle (#3425) #3481
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!3481
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/netprobe-systemd-unit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
migrate-netprobe-to-native-addon§1.3 — ships the netprobe systemd-service unit in the signed pushed-artifact bundle and resolves the standalone-vs-agent-launched open question tosystemd-service.Why systemd-service (the open question, resolved from the code)
rust/netprobe/src/server.rsUnixListener::bind) and the agent connects as a client (go/pkg/agent/netprobe/client.goDial).--configis optional: netprobe starts with its lifecycle IPC available and stays disabled until configured over IPC (main.rs).So the migration keeps the existing config-over-IPC + ingest path unchanged; the only thing that moves is process supervision — from the agent's sidecar manager to systemd. The manifest already declared
supervision: systemd-service; this makes it real.What's in the bundle
addons/netprobe/serviceradar-netprobe.service— runs asUser=serviceradar(manifestrequires.run_as) withCAP_NET_RAW/CAP_BPF/CAP_PERFMONgranted ambient + bounded. eBPF-hostile hardening (MemoryDenyWriteExecute,SystemCallFilter=~@privileged,PrivateDevices) is deliberately omitted;ExecStartruns--socket /run/serviceradar/netprobe/ipc.sockwith no--config.InstallAddonSystemdUnits— noExecStarttemplating), so itsExecStarthardcodes the fixed staged path/var/lib/serviceradar/agent/addons/netprobe/current/serviceradar-netprobe. A Go contract test (netprobe_systemd_unit_test.go) pins that path toresolveAddonArtifactRootso the unit and the staging layout can't drift apart.unit_entries(thedefs.bzlplumbing already mapped these to the assembler's--entry); the unit rides flat at 0644 in each per-arch tarball, next to the binary, where the agent'sdiscoverStagedAddonUnitsfinds it.Scope / safety
The unit is inert until §2.2 wires assignment-gated activation (today netprobe is still started by the always-on
applyVisibilityConfigsidecar path). Final hardening is locked in by the §4.3 scratch-agent e2e — native bundles cross-compile + run on Linux only, so the unit's runtime behavior is validated there, not on this host.Validation
addon-manifest-validator addons/netprobe/addon.yaml→OKserviceradar-netprobe.serviceflat at 0644 in the per-arch tarball (alongside the 0755 binary)bazel queryloads//addons/netprobe(:netprobe_systemd_unitresolves) and the 6netprobe_addon_bundle*targets with the newunit_entriesgofmtcleanopenspec validate migrate-netprobe-to-native-addon --strict→ validFollow-ups (migrate-netprobe §2.x)
applyVisibilityConfigsidecar path🤖 Generated with Claude Code
lgtm