feat(agent): dispatch systemd-service/timer add-ons via agent-updater (delivery-models 3.1) (#3425) #3467
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!3467
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/addon-systemd-dispatch"
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?
What
Slice 2b of
add-native-addon-delivery-models— wires the systemd supervision primitive (the agent-updater install/enable from the prior slice, merged in #3465) into the agent's assignment reconciliation, completing the agent side of task 3.1. This is what makes asystemd-serviceadd-on (e.g. netprobe) or asystemd-timeradd-on (e.g. Bumblebee) actually install and run from a pushed assignment.Design
classifyAddonSupervision:systemd_service/systemd_timernow route to a newaddonDispatchSystemd(ephemeral-helper stays unimplemented).stageAndCapability(stage → setcap → rollback) used by both the sidecar and systemd paths; sidecar handling moved tobuildSidecarAddonSpec(behavior preserved).applySystemdAddon: stage → discover the.service/.timerunits shipped inside the signed staged bundle (the agent reads its own staging area — no proto/manifest/DB unit plumbing) → install + enable the primary (timer forsystemd_timer, service forsystemd_service) via the root-owned updater. Rollscurrentback on any failure.reconcileSystemdAddons: tracks installed units per add-on and uninstalls those no longer desired (disabled/unassigned) — satisfies "disabling stops it".Adversarial review + hardening (2nd commit)
Ran a multi-lens adversarial review of the first commit; fixed the confirmed findings:
addonReconcileMu(it runs from the poll/control-stream/enroll goroutines) so concurrent rounds can't race over the tracking map. Verified with-race.Verification
go build/vetclean;golangci-lint0 issues; addon test suite passes under-race.stringsNotIn, rehydration discovery.systemd_service(install → enabled/active → uninstall → removed) andsystemd_timer(install.service+.timer, enable.timer→ enabled/active/scheduled → uninstall) verified end-to-end against the built updater.Scope / follow-ups
staging.🤖 Generated with Claude Code
lgtm