Skip to content

Fix rootless gateway control socket - #259

Open
tella-butler wants to merge 1 commit into
mainfrom
fix-user-gateway-control-socket
Open

Fix rootless gateway control socket#259
tella-butler wants to merge 1 commit into
mainfrom
fix-user-gateway-control-socket

Conversation

@tella-butler

Copy link
Copy Markdown
Contributor

Summary

  • place the source gateway supervisor control socket under XDG_RUNTIME_DIR for rootless systemd user services
  • keep the existing /run/opensession-gateway path for system services and preserve explicit overrides
  • cover all three path-resolution cases

Root cause

The rootless unit creates RuntimeDirectory=opensession-gateway under /run/user/<uid>, but the source gateway supervisor always listened on /run/opensession-gateway/control.sock. On a clean Ubuntu install that parent directory does not exist, so the supervisor crash-loops with ENOENT while ingress remains up with no backend.

This is deterministic on current origin/main, not a readiness flake. A fresh Ubuntu 24.04 systemd container reproduced the installer exit after both readiness windows. With this change, the same clean install exits 0, /api/health responds, all three user services are active, and the control socket is owned by the installing user under /run/user/<uid>/opensession-gateway.

Verification

  • bun test scripts/lib/service.test.ts packages/core/opensession-server/src/server/gateway-supervisor.test.ts
  • bun scripts/check-module-side-effects.ts
  • bun run check
  • clean Ubuntu 24.04 install.sh --yes --no-engine before and after the fix

Started by Johnny Lin in this OS session

@open-session-os-tella-dev

open-session-os-tella-dev Bot commented Sep 1, 2026

Copy link
Copy Markdown

🤖 OS review · approve · confidence 5/5

Safe to merge. The change correctly resolves the control socket beneath XDG_RUNTIME_DIR for rootless systemd services while preserving the system-service fallback and explicit override. Callers and service rendering remain compatible, and the tests cover all resolution branches.

💡 Labels: os-adversarial — deeper two-pass review · os-simplify — quality cleanup pass · os-auto-fix — fix anything outstanding and push until CI passes.
Reviewed 564be80 · GPT-5.6 Sol · earlier reviews collapse above · open session

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
opensession Ready Ready Preview Sep 1, 2026 5:36am UTC

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants