Repository navigation
nixos(locate): prune the generated fleet tree from updatedb (#10589) - #10606
Conversation
updatedb walked ~/git/fleet/watcher-bench-195/fixtures/manydirs, exhausted its fd limit, exited 1, and the failed unit made a healthy nixos-rebuild switch report status 4. The fleet tree is generated worktrees and bench corpora with no locate value, so add it to services.locate.prunePaths instead of indexing it. LimitNOFILE is already 524288 on amd; pruning removes the scanner's blowup rather than raising the ceiling again. Validated: nix-instantiate --parse and nixfmt --check on the module.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Setting services.locate.prunePaths replaces the option default rather than appending to it, so the first cut dropped /tmp, /var/cache, /nix/store and the other stock prunes. Restate the default list with the fleet tree appended, verified by evaluating config.environment.etc."updatedb.conf".text.
Problem
update-locatedb.servicefails on amd scanning the generated fleet tree:The unit's
LimitNOFILEis already 524288 on amd, and it still fails — themanydirsfixture tree is deep and wide enough that plocate reports the 131072 limit and exits 1. On 2026-11-15 that failure landed mid-nixos-rebuild switch, soswitch-to-configurationcounted the unit and exited status 4 even though the generation activated correctly.Solution
services.locate.prunePaths = [ "/home/user/git/fleet" ].~/git/fleetis generated worktrees plus watcher-bench corpora — no locate value — so pruning is the right fix rather than another fd-ceiling bump. Paths that do not exist on other hosts are harmless inPRUNEPATHS.Verification
nix-instantiate --parse nixos/services/default.nix— OKnixfmt --check nixos/services/default.nix— OKfailed (Result: exit-code), journal nameswatcher-bench-195/fixtures/manydirs/d130875: Too many open files;/etc/updatedb.conf/ExecStart currently carry only the stock/tmp /var/tmp … /nix/storeprune list.Final acceptance (the unit completes on amd and a switch no longer risks a false failure) is verified after this config is deployed to amd; this PR supplies the prune entry.
Fixes #10589
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.