Repository navigation
Read the kit commit as root in the reconcile check too, and do not re-arm a running setup - #127
Merged
Merged
Conversation
…-arm a running setup Since #114 ensure-imageid.sh calls apply-reconcile-check.sh as root, before every klipper start. That script compared the kit's HEAD against the stamp with a plain `git -C`, which root, with no HOME and against a clone owned by the printer user, refuses as dubious ownership -- so the fallback answered with the flat .kit-commit baked into the image, a value that never moves. The stamp could never match, the marker was armed on every start, and the full optimize-boot.sh run (about 60 s, 22 daemon-reloads) came with it: 56 runs in the reconcile log by 2026-09-05, three of them for one and the same kit commit within twenty minutes, on a printer that had not changed. Measured on the dev printer: Moonraker needing 46 s instead of 19 s to initialise and the display arriving 30-40 s late, every boot, since 2026-09-03. `-c safe.directory='*'` on the command line fixes it regardless of HOME, the same way optimize-boot.sh already reads the commit where it writes the stamp; and with .git present the flat file is never consulted again. Second, the same check runs twice per start: as root from drop-in 19, which starts the setup at once, and as the owner from drop-in 25 a few seconds later, while that run is still going and the stamp not yet written. Re-arming there bought a second full run on the next start, which is why most commits appear twice in the log. It now leaves an active arco-reconcile alone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom: since 2026-09-03 every boot is a slow boot: Moonraker needs 46 s instead of 19 s to initialise and the display arrives 30–40 s late.
Root cause: since #114
ensure-imageid.shcallsapply-reconcile-check.shas root before every klipper start. Its plaingit -C … rev-parse HEADis refused by root (noHOME, clone owned by the printer user, dubious ownership), so the fallback reads the flat.kit-commitbaked into the image,5d1efdfafrom 15.08. on the dev printer, which never moves. The stamp can never match, the marker is armed on every start, and the fulloptimize-boot.shrun comes with it: 56 runs inarco-reconcile.logby today, three for one and the same kit commit within twenty minutes on a printer that had not changed.Second defect, same file: the check runs twice per start, as root from drop-in 19, which starts the setup at once, and as the owner from drop-in 25 a few seconds later while that run is still going and the stamp not yet written. Re-arming there bought a second full run on the next start; most commits appear twice in the log.
Change:
-c safe.directory='*'on thegitcall, the same wayoptimize-boot.shalready reads the commit where it writes the stamp; with.gitpresent the flat file is never consulted again; and no arming whilearco-reconcile.serviceis active.Checks:
bash -n, ShellCheck error-severity clean. Verified on the dev printer:.kit-commit=5d1efdfa, HEAD =5270fe1, stamp rewritten on three consecutive boots without a kit change.🤖 Generated with Claude Code