Repository navigation
🐛 fix: find default tmux sockets under arbitrary container UIDs - #14795
thatguywob wants to merge 1 commit into
Conversation
Search the runtime UID, dev passwd UID, and remaining default servers in order, deduplicating candidates and requiring the requested session. Share discovery with diagnostics and preserve owner-aware su-exec calls. Respect TMUX_TMPDIR for both default and per-agent sockets. Add isolated socket/stub regression coverage wired into CI. Hive-Run: hivecommons#14789 Hive-Plan: default-tmux-socket-discovery Hive-Spec: hivecommons#14789#fix Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch:
Conflicts are checked with every PR merged onto the current tip of
|
|
Supersession sweep found that this PR's claimed issue is already closed by another merged PR.
Decision needed (@hivecommons): #14791 already merged and closed the claimed issue, but this PR touches files the merged PR did not. Recommended: keep open until the extra changes are reviewed, or close as superseded if they are not wanted. Another option: merge anyway. Files the merged PR did not touch: This comment is edited in place by the supersession sweep; it is not duplicated. |
8f09b42
|
|
|
@thatguywob this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (2 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether to close this in favour of merged #14791, or have the author rebase it down to the one remaining delta (su-exec for list-sessions on foreign-owned default sockets in the diagnostics path).
Conclusion: the fix this PR makes for #14789 already landed on v5 via #14791, which is why this PR is now CONFLICTING. What survives is a small diagnostics-only improvement; a maintainer should decide whether that is worth a rebase.
What I compared (head 8f09b42 vs. v5 after #14791):
| Behaviour | #14795 (src/deploy/ttyd-tmux.sh) |
v5 today |
|---|---|---|
Try tmux-$(id -u)/default before tmux-<dev passwd uid>/default |
default_socket_candidates, head :39-51 |
default_socket_candidates, v5 :79-96 |
Then any tmux-*/default, deduplicated |
yes | yes |
Respect TMUX_TMPDIR |
TMUX_ROOT, head :38 |
TMUX_SOCKET_ROOT, v5 :45-46 |
Skip default basenames when listing per-agent sockets |
yes | yes, v5 :55 |
list-sessions on a default socket owned by a different UID |
goes through socket_tmux → su-exec owner (head :77-91), so sessions are listed |
bare tmux -S … list-sessions (v5 :64) — fails silently via ` |
So the last row is the only semantic difference, and it affects only the error-path hint, not whether attach succeeds (attach already used su-exec for non-owner sockets before either PR). The remaining diff is otherwise a re-implementation of #14791 with a different test file (test_ttyd_socket_discovery.sh, Python-stubbed) alongside the one #14791 added (test_ttyd_default_socket_uid.sh, already wired at v2-ci.yml:1010).
Why this is routed rather than judged: the PR carries sentinel-alert and touches .github/workflows/v2-ci.yml. The workflow change itself is only a new run: bash src/deploy/test_ttyd_socket_discovery.sh step (no permissions, no removed checks), and the author holds role/trusted — stating that for the record; the trust call is yours.
I have not closed or changed anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Closed as superseded by #14791 by @clubanderson from the Hive dashboard. Duplicate: #14789 was fixed by #14791 (merged 2026-10-28T01:52Z), which this branch now conflicts with. The UID-ordered socket search here is equivalent in effect; thanks @thatguywob. |
Summary
Fix terminal attach on OpenShift and other containers whose runtime UID differs from the
devpasswd entry. Search deduplicated default socket candidates in runtime UID, passwd UID (or 1001), then remaining UID order; require the requested session before selecting a socket. Preserve per-agent socket priority and owner-awaresu-exec, including for session diagnostics, and honorTMUX_TMPDIR.Fixes #14789
Testing
AGENTS.mdrequires CI validation for agent-authored changes.TMUX_TMPDIRcontaining spaces.— hive: backend=codex
🐝 Hive Agent:
contributor| SHA:8f09b4298