Use per-run temp dirs for mounts instead of fixed /mnt paths - #10
Conversation
Every backend mounted on a fixed path (/mnt/nfs, /mnt/loop, /mnt/beegfs) while the backing state it creates -- the exported .orig dir, the loop .img -- lived under $TMPDIR. So a run told to work in ~/.tmp still handed the wrapped command TMPDIR=/mnt/nfs: concurrent runs collided on one mountpoint, the directory needed root under /mnt just to exist, and nothing in the path said which run owned the mount. Derive the mountpoint from the same `mktemp -u` base as the backing state instead, as a sibling suffixed with the backend name: ~/.tmp/eval-under-nfs-B3UXj.orig exported backing dir ~/.tmp/eval-under-nfs-B3UXj.nfs where this run mounts it --mount-point / EVAL_UNDER_MOUNT still pin the mount to a fixed path when one is actually wanted. Teardown now removes the mountpoint only if this run created it, so an explicitly given directory that predates us is unmounted rather than deleted. beegfs --data-root stays /beegfs: it is bind-mounted into the containers and has to sit on a local filesystem with working extended attributes, which $TMPDIR (tmpfs on plenty of systems) does not guarantee. Rationale now spelled out in its --help entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011udwBohkmsizgX1nGUDUBG
CI: every red cell so far is the matrix baseline, not this changeChecked each failing cell of run 35807756537 against master's last scheduled run, 35590469985, which ran on
Not just the same conclusions — the same findings:
The cells this change could plausibly have broken — where the mount moved out of Still running: NFS / git testsuite, BeeGFS 7.4.6 + 8.1.0 / git testsuite (green on master, so they are the ones left to confirm) and BeeGFS git-annex test on both versions (red on master). I'll follow up only if one of the baseline-green cells comes back red. No re-run spent on the above: these are deterministic, documented filesystem findings reproduced assertion-for-assertion on the base branch, so a re-run has nothing to disambiguate. Generated by Claude Code |
master's PR #10 replaced every backend's fixed /mnt/<backend> with a per-run directory derived from the same mktemp base as the backend's backing state. This branch added a backend while that was landing, so git merged bin/eval-under-sshfs cleanly and left it on /mnt/sshfs -- textually fine, and wrong: the README this merge brings in states that a backend mounts next to its backing state "never a fixed /mnt/<backend>", and its "Adding a new backend" contract names $MNT_BASE.<backend> outright. The merge is only done once the new backend obeys it. So eval-under-sshfs now derives both paths from one mktemp -u base: /tmp/eval-under-sshfs-B3UXj.scratch host key, sshd conf, backing dir /tmp/eval-under-sshfs-B3UXj.sshfs where this run mounts it and teardown removes the mountpoint only when this run created it, so an explicit --mount-point that predates us is unmounted rather than deleted -- same rule the other backends now follow. The 755 on the scratch dir (mktemp -d would give 700) now says why it is there: sshd reads its config as root while the mount runs as the invoking user. README's conflict was two additions to the same spot, not a disagreement: master's mountpoint explanation follows the CLI flag list it belongs to, then the Reproducing-a-report section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E1fDiGVWKywpbhVps5hzQK
Summary
Changes all three backends (
eval-under-nfs,eval-under-loop,eval-under-beegfs) to default to per-run mountpoints under$TMPDIRinstead of fixed/mnt/<backend>paths. This eliminates collisions between concurrent runs, removes the need for pre-existing/mntdirectories, and makes leftover mounts self-describing.Key Changes
Default mountpoint derivation: Each backend now derives
MNTfrom aMNT_BASEcreated viamktemp -u, generating sibling paths like~/.tmp/eval-under-nfs-B3UXj.orig(backing) and~/.tmp/eval-under-nfs-B3UXj.nfs(mount). The old fixed defaults (/mnt/nfs,/mnt/loop,/mnt/beegfs) are no longer used unless explicitly passed via--mount-pointorEVAL_UNDER_MOUNT.Selective teardown: Added
MNT_CREATEDflag to track whether the current run created the mountpoint. Teardown now only removes the mountpoint if this run created it, preserving pre-existing directories passed via--mount-point.Updated documentation:
--mount-pointnow explains the new default behavior with concrete examples<mount>placeholder instead of hardcoded/mnt/beegfsConsistent implementation across backends: All three backends follow the same pattern for consistency and maintainability.
Implementation Details
MNT_BASEis created once per run usingmktemp -u(reserves name without creating directory)mount_*()function, which also setsMNT_CREATED=1if the directory didn't pre-exist--mount-pointstill works as before and takes precedence over the derived defaulthttps://claude.ai/code/session_011udwBohkmsizgX1nGUDUBG