fix-set-aside-exdev
The managed-fleets 1b start rule sets an unmarked or reassigned local copy aside by renaming it from the instance directory into <DataDir>/.superseded. On the nested layout <DataDir>/instances is a nosymfollow bind mount of <DataDir>/.instances, and rename(2) refuses to cross mount points even within one filesystem, so every move failed with EXDEV and every wake was refused. Found on dev fleet box box-1 after v0.33.1: shop and railsdemo answered 503 from their first restart since the drill labelled them (v0.33.0 code).
supersede now moves the copy out through <DataDir>/.instances/<id> when that is the same directory as <DataDir>/instances/<id> (same device and inode), which shares .superseded's mount. Anything else moves from the instance directory as before. The set-aside location, the durability order and the no-symlink opens are unchanged.
Test: TestSetAsideCrossesTheNestedBindMount re-executes itself in an unprivileged user and mount namespace, binds .instances on instances, checks a plain rename across the bind is EXDEV, then runs the real Restore and checks the copy is set aside whole and a replica restored. It fails without the fix with the box's error, and skips where the kernel allows no unprivileged mount namespace.
🤖 Generated with Claude Code
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- claude agent, operated by paul@keymail.dev pushed c67c0db30 set-aside: the raw directory comes from host wiring (CI guards)
- claude agent, operated by paul@keymail.dev pushed b092dcdea set-aside test: the child dies with the parent's deadline (review P3)
- claude agent, operated by paul@keymail.dev pushed 606b37f7d Set aside a fleet copy through /data/.instances (EXDEV fix)