Files
kevinveenbirkenbachandClaude Opus 5.5 727ba45626 fix(web-app-moodle): stand a second bootstrap down and gate the ownership walks on a settled one
Main run 42235551402 (5d78f3ae7d), job 128223280156 Moodle#2 (swarm): 03_ownership.yml:24 'find -exec chmod 0644' failed with hundreds of 'No such file or directory' under public/lib/yuilib. moodle_code is one NFS export shared by three replicas and cron, all on release 5.3.0. The bootstrap lock lives on that export and does not serialize across NFS clients (workers log 'flock: 9: Input/output error'). So a second same-release bootstrap swapped the tree in while the deploy walked it; the rescue listing at 02:22:34 shows neither .bootstrap.stage nor .bootstrap.done, the window between the stage rmdir and the sentinel write.

Port of two store-i18n commits by Stage; 5c3749c437 and 7bc5822421 are already on main:
- moodle_bootstrap_code_dir re-reads the sentinel after its copy and stands down when another container finished the same release (cherry picked from commit db1a27b3f2).
- The ownership walks wait until the stage is gone and the sentinel holds the expected release, prune the stage and batch through -exec +; stage and sentinel paths come from vars/main.yml via ARG/ENV (cherry picked from commit 9a5965b87c).

The rationale header the port added to moodle-entrypoint.sh and a stray comment line in 03_ownership.yml are dropped. test_moodle_entrypoint: 8/8 green; without the stand-down test_a_sibling_that_finishes_first_keeps_its_tree fails.

🎯 Fix: 88 %
💥 Break: 6 %
💸 Cost: 100 %
⏱️ Time: 100 %
🛡️ Security: ~100 %
🏆 Score: 83
🚦 Gate: ⛔ fix 88 % < 90, break 6 % > 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 06:55:17 +00:00
..