fix: v2.7.3 — Update now restarts through our own service unit, member panes stay live on a dev server, a start refuses a missing folder
- self-restart: a server in our unit's cgroup (/agenthub.service, system or user) restarts via `systemctl restart --no-block` (sudo -n for the system unit), our launchd job by exiting into KeepAlive. The detached restart-helper replacement held the port while Restart=always started the unit every 3 s (v2.7.2 on the S3 box: 240+ restarts, MainPID 0). - run-as.mayHaveTmux: only ENOENT means "no tmux". A dev server in server mode without CAP_DAC_READ_SEARCH got EACCES on a member's 0700 .agenthub/tmux, dropped the member from the list and ended their runs within seconds — the real cause of `401 not a live pane's token`. - tmux: a member's list is re-asked every 5 s, not 1 s (one sudo + three auth.log lines each). - POST /api/lanes/:id/start: 409 ENOCWD for a folder that no longer exists (the pane started in the account's home otherwise). - Settings: Remote sources only for staff (a developer got a 403). - scripts/test-server.js drops every inherited AGENTHUB_* (pane env). Tests: self-restart.test.js, server-s3-panes (mayHaveTmux), lanes-api (ENOCWD); touched suites 771 + client pages 191, tsc -b.
This commit is contained in:
+20
-1
@@ -801,7 +801,26 @@ agenthub users provision alice # the Linux account only (a user made before
|
||||
v2.7.2 on it leaves any run and workspace under the users root (read from
|
||||
`/etc/agenthub/server.conf`) alone; a build older than v2.7.2 marks their
|
||||
runs interrupted or abandoned within seconds, and the proxy gateway then
|
||||
refuses those panes (`401 not a live pane's token`).
|
||||
refuses those panes (`401 not a live pane's token`). A dev server that DOES
|
||||
run in server mode (it read `AGENTHUB_MODE=server` from
|
||||
`~/.config/agenthub/settings.env`) but lacks the unit's
|
||||
`CAP_DAC_READ_SEARCH` cannot stat a member's 0700 `.agenthub/tmux`; from
|
||||
v2.7.3 on that `EACCES` counts as "maybe running" and the member's list is
|
||||
asked through sudo, never read as "no panes".
|
||||
- **Update now** under the system unit restarts through
|
||||
`sudo -n systemctl restart --no-block agenthub.service` (from v2.7.3). An
|
||||
older build started a detached replacement instead, which kept the port
|
||||
while `Restart=always` started the unit every few seconds, each start exiting
|
||||
"already running" — `systemctl status agenthub.service` shows
|
||||
`activating (auto-restart)` with `MainPID` 0. Recover with
|
||||
`kill -TERM <pid of the server on the port>`; the unit then starts on the
|
||||
new code.
|
||||
- A member's tmux list is re-asked at most every 5 s (one `sudo` each, which
|
||||
writes three `auth.log` lines); a pane the dashboard starts or stops shows at
|
||||
once, one that exits on its own within those 5 s.
|
||||
- Claude Code does not carry a folder's trust down from the member's home
|
||||
(which provisioning trusts): a member answers "Trust this folder" once per
|
||||
workspace, in the terminal.
|
||||
|
||||
### Undo and uninstall
|
||||
|
||||
|
||||
Reference in New Issue
Block a user