Skip to content

Linux: service install stops the agent and does not start it — watchdog did not recover (remote host goes offline) #5252

Description

@SemoTech

Summary

On an already-enrolled Ubuntu 24.04 host, breeze-agent service install stopped breeze-agent.service and left it inactive. The running watchdog logged an IPC EOF and did not bring the agent back. The device went Offline until someone ran systemctl start breeze-agent out of band.

That is a stranding risk for any remote Linux box where the only management path is the agent (no SSH).

What we ran

Self-host API/web v0.110.0, host was already enrolled on 0.104.0. We staged the v0.110.0 Linux amd64 agent + watchdog binaries into /usr/local/bin/, then ran:

breeze-agent service install

BRT dropped (Device is not online). On the box immediately after:

  • /usr/local/bin/breeze-agent printed v0.110.0
  • breeze-agent.service = inactive (dead) — last systemctl stop at the moment of service install
  • breeze-watchdog.service still active, but still the old 0.104.0 process (binary on disk replaced, process not restarted)
  • Watchdog log: watchdog ipc: read loop error: ipc: read header: EOF
  • No subsequent systemctl start from watchdog in the next ~minute

systemctl start breeze-agent + systemctl restart breeze-watchdog recovered the host (Online, agent 0.110.0).

Code (v0.110.0)

agent/internal/agentapp/service_cmd_linux.go service install:

  1. systemctl stop breeze-agent (comment: “safe for upgrades”)
  2. rewrite unit, daemon-reload, enable
  3. print “installed and enabled”
  4. if enrolled and not running → print “Next steps: sudo breeze-agent service start”
  5. never systemctl start

breeze-watchdog service install is the same shape (stop + enable, “Start with: sudo breeze-watchdog service start”).

Docs still say re-running service install “reinstalls the agent binary and restarts the agent service (safe for upgrades)”. That restart does not happen.

Why watchdog did not save us

A clean systemctl stop is a successful exit. Watchdog saw IPC EOF and stayed put. It did not treat “unit enabled but inactive” as a recover-and-start condition — at least on the 0.104.0 watchdog process that was still running.

So: install stops the agent → remote session dies → watchdog does not start it → box is offline until console/SSH.

Expected

  • If the host is already enrolled, service install should start (or restart) the agent before returning.
  • Watchdog should recover an enabled-but-inactive agent after an upgrade/stop, not only after a crash.
  • Official auto-update (promote / watchdog apply) must not share this “stop and wait for a human” path.

Ask

Please confirm the in-band agent auto-update path on Linux always starts the new agent without a human. If service install is also a supported upgrade method (docs say it is), it should start the service when enrolled.

We can retest a Linux canary after a fix. We will not promote the fleet until this stranding hole is closed.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcategory:agenteffort:mOne PR, multi-daypriority:p1Committed — we intend to do this; starts as soon as capacity frees. Keep it a handful.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions