Report services needing a restart via a separate root needrestart unit
needrestart has to inspect every process, which an unprivileged agent can't (and unprivileged it gave false kernel results). Add kernelwatch-needrestart.service: root with only CAP_SYS_PTRACE and CAP_DAC_READ_SEARCH, PrivateNetwork=yes, list-only (-r l). It writes `needrestart -b` output to /run/kernelwatch/needrestart; the agent unit pulls it in before each report and reads the file (ignored if older than 2h). The agent no longer runs needrestart itself. Skipped cleanly when needrestart isn't installed: the dashboard shows "?" and status is unaffected. Server: services_need_restart / sessions_need_restart fields, an "update"-level reason, a Services column, and a note (not an escalation) for hosts running an agent older than the one shipped with the server. install.sh --with-needrestart installs needrestart and sets it to list services after apt upgrades instead of prompting; deploy.sh passes anything after `--` to install.sh. Agent 0.2.0, server 0.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
69d4cf6363
commit
834c1459c0
14 files changed
+258
-26
No files matched your search
@@ -1,3 +1,7 @@
|
||||
"""kernelwatch: fleet kernel and reboot status dashboard."""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
__version__ = "0.2.0"
|
||||
|
||||
# Version of agent/kernelwatch-agent shipped alongside this server; older agents
|
||||
# are noted on the dashboard. tests/test_status.py checks the two stay in sync.
|
||||
AGENT_VERSION = "0.2.0"
|
||||
Reference in new issue
Block a user