Repository navigation
perf(roles/aide, roles/librenms, roles/system_update): skip the check right after an AIDE re-baseline - #750
Merged
Conversation
… right after an AIDE re-baseline `aide --update` compares the whole file system like a check before it writes the new database, so the check that followed it scanned everything a second time only to find no differences, and on a small host it was the main cause of I/O pressure alerts after the nightly update. After a successful re-baseline the scripts and the role now only reset a failed state of aidecheck.service. After a finding or a failed update the check still runs. Verified with molecule (aide) on Rocky 8, 9, 10 and Debian 12, 13, and end to end with update-and-reboot on the same platforms and librenms-daily on Rocky 9: no second check, aide-logfile reports the accepted update as OK, a check afterwards is clean.
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.
After a successful AIDE re-baseline,
update-and-reboot,security-update,librenms-daily, the dpkg hook andupdate-db.ymlof the aide role no longer startaidecheck.service.aide --updatealready scans and compares the whole file system before it writes the new database, so the check right after it only repeated that scan and found nothing. Now they just runsystemctl reset-failed aidecheck.service. After a finding or a failed update, the check still runs as before.The update is still scanned and accepted right away (
aide --update+mv), and the window between the package transaction and that scan stays the same. On a 1-vCPU Rocky 8 host, the extra check was what set off the PSI I/O warning after the nightly update.Tests:
molecule test --scenario-name aideon Rocky 8, 9, 10 and Debian 12, 13: all stages green. verify.yml now also asserts that a re-baseline (handler, unattended-upgrades) starts no check, and that a check afterwards is clean.update-and-rebooton the same five platforms (aide 0.16 to 0.19.2), with real package and kernel updates and a stale failedaidecheck.service: no second check,Result=success, aide-logfile reports the accepted update as OK, and a check by hand afterwards is clean.librenms-dailyon Rocky 9: no check after a re-baseline. With drift beforedaily.sh, it still starts a check, which fails.