Skip to content

fix(controller): reopen audit log on SIGHUP - #308

Merged
WaylandYang merged 1 commit into
mainfrom
codex/issue-278-sighup-audit-reopen
Aug 15, 2026
Merged

fix(controller): reopen audit log on SIGHUP#308
WaylandYang merged 1 commit into
mainfrom
codex/issue-278-sighup-audit-reopen

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Summary

  • reopen the audit sink under the writer lock on SIGHUP and emit a log_reopened boundary event
  • preserve graceful SIGINT/SIGTERM shutdown, tolerate individual signal-registration failures, and clean up the signal task with the daemon
  • replace copytruncate with rename/create plus systemd reload, retaining a safe restart fallback for older installed units
  • document the rotation workflow and cover successful and failed reopen paths

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings (Linux container)
  • cargo test --all (Linux container)
  • git diff --check
  • verified the Arch logrotate SHA-256 and packaging assertions

Closes #278

Signed-off-by: WaylandYang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit c43c9e1 into main Aug 15, 2026
6 checks passed
@WaylandYang
WaylandYang deleted the codex/issue-278-sighup-audit-reopen branch August 15, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

audit log: SIGHUP reopen so rotation doesn't drop records

1 participant