Skip to content

Retry systemd reload in the fingerprint recovery migration - #14260

Merged
dhh merged 2 commits into
quattrofrom
fix/fingerprint-migration-reload
Oct 4, 2026
Merged

dhh merged 2 commits into
quattrofrom
fix/fingerprint-migration-reload

Conversation

@omarchybot

@omarchybot omarchybot commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

The fingerprint recovery migration installs its systemd stop-timeout drop-in before reloading systemd. If reload fails or the migration is interrupted, the next run sees the installed file and skips reload, allowing the migration to complete without applying the timeout.

Preserve the existing hook and drop-in contents, then query systemd's reload state without elevation. Reload only stale configuration, so a failed or interrupted repair is retried while later users can complete an already-applied machine-wide repair without sudo. Query and reload failures keep the migration pending.

Follow-up to #7158.

A failed reload leaves the migration pending with the drop-in already installed. Reload existing configuration on retry so completion means systemd has applied the stop timeout, while preserving administrator changes.

Co-Authored-By: Codex Medium <317366263+omarchybot@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Changes how a system migration reloads the service manager.

The PR appears safe to merge; no actionable new failure was established.

Summary

The migration now queries systemd’s reload state before deciding whether to reload the fingerprint service configuration. The tests cover retry after reload failure, query failure, and completion by a later user without sudo.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Migration finds drop-in] --> B[Query NeedDaemonReload]
  B -->|yes| C[Reload systemd]
  B -->|no| D[Complete migration]
  B -->|query fails| E[Leave migration pending]
  C -->|succeeds| D
  C -->|fails| E
Loading

Reviews (2) · Last reviewed commit: "Avoid sudo for an already-applied finger..."

Comment thread migrations/1791125650.sh Resolved
@omarchybot

omarchybot commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator Author

GPT-6 in Codex reviewed this follow-up with Codex Medium. Its second opinion identified the skipped reload on retry. Greptile's later-user sudo finding was also verified and corrected. Both reviewers are credited on the commits carrying their contributions; Greptile does not disclose its model. Codex Medium's final source review found no further actionable defects; where it agreed, independence is not guaranteed.

On disposable Omarchy ISO workers, the regressions failed with the original skipped-reload code and the unconditional-reload intermediate head, then passed with the final fix. Native systemd 261 detected the first newly installed drop-in as stale after an injected reload failure; retry applied the three-second timeout. Subsequent runs with all sudo refused completed successfully, including when the harmless test service was inactive. The native check retargeted only the queried service name in a temporary migration copy because the worker has no fingerprint daemon or physical reader. Query failure remains a migration failure, and existing files are preserved.

The complete suite retains only the preexisting failures: CLI's VS Code fixture, both kernel migration fixtures, captive-portal QML, background preparation state, and the passwordless package lifecycle. The first five are repaired in #14259; the unchanged lifecycle check passes against companion omarchy-pkgs #257. No new failure appeared. This follow-up is ready for maintainer review; nothing was merged.

Migration completion belongs to each user, while the systemd repair is machine-wide. Query systemd reload state without elevation and reload only stale configuration, so interrupted repairs still retry and later users can complete without sudo. A failed state query remains a migration failure.

Co-Authored-By: Greptile <165735046+greptile-apps[bot]@users.noreply.github.com>
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Oct 4, 2026
@dhh
dhh merged commit 72c152a into quattro Oct 4, 2026
1 check passed
@dhh
dhh deleted the fix/fingerprint-migration-reload branch October 4, 2026 17:30
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants