Skip to content

config: put the default CI socket and dt file's trace in TMPDIR - #394

Merged
techomancer merged 2 commits into
techomancer:mainfrom
jamesbraid:host-temp-dir
Nov 2, 2026
Merged

techomancer merged 2 commits into
techomancer:mainfrom
jamesbraid:host-temp-dir

Conversation

@jamesbraid

@jamesbraid jamesbraid commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Two iris --ci processes on one host share /tmp/iris.sock. The second one removes the first's socket file before it binds (cleanup_socket_path in ci.rs), so the first keeps running and nobody can reach it. Parallel CI jobs, two users, or a test run next to a manual session all hit this. The only way out was --ci-socket on every run.

The default socket and dt file's default trace now come from std::env::temp_dir(). A job that sets TMPDIR to its own directory gets its own socket. iris-ci and tools/iris-test work out the default the same way, so they still agree.

The catch: iris and iris-ci meet by default only when they share TMPDIR. A failed connect to the default socket now prints the path it tried and says to use the same TMPDIR or pass the path (--socket or $IRIS_SOCKET). Scripts that pass the path are unaffected. Windows keeps its TCP default. macOS sets TMPDIR for every login, so there the default socket moves under /var/folders.

Not in this PR: the --ci disk overlay still goes to /tmp. Guest paths are untouched.

New tests cover the default socket, a socket in a given directory, the same with TMPDIR set in a child process, the connect hint, and the dt file path. Not run on macOS or Windows.

Two iris --ci runs on one host share the default socket, /tmp/iris.sock.
The second one removes the first's socket file before it binds, so the
first keeps running and nobody can reach it. Parallel CI jobs, two users,
or a test run next to a manual session all hit this, and the only way out
was --ci-socket on every run.

The default now comes from std::env::temp_dir(). A job that sets TMPDIR
to its own directory gets its own socket. iris-ci and tools/iris-test
compute the default the same way, so they still agree.

The catch: iris and iris-ci meet by default only when they share TMPDIR.
A failed connect to the default socket now says where it looked and how
to name the path. Windows keeps its TCP default. macOS sets TMPDIR for
every login, so there the default moves under /var/folders.
dt file with no path wrote /tmp/iris_trace.txt whatever TMPDIR said, so
concurrent runs shared one file. On Windows that path means \tmp on the
current drive, which need not exist. Use std::env::temp_dir(), as the CI
socket does now.
@techomancer
techomancer merged commit ddea4fd into techomancer:main Nov 2, 2026
14 checks passed
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