feat(fail2ban): reload instead of restart when jail.local changes #332

Merged
Dragonish merged 2 commits from feat/fail2ban-reload into main 2026-11-23 20:15:08 +00:00
2 Commits
Author SHA1 Message Date
Defame1297 9d31fd9461 Merge branch 'main' into feat/fail2ban-reload
Build / build (pull_request) Successful in 15s
Molecule / molecule (pull_request) Successful in 3m48s
Lint / lint (pull_request) Successful in 1m20s
2026-11-23 20:08:26 +00:00
Dragonish e0e9fa1b17 feat(fail2ban): reload instead of restart when jail.local changes
Build / build (pull_request) Successful in 16s
Molecule / molecule (pull_request) Canceled after 0s
Lint / lint (pull_request) Canceled after 1m23s
The main entry point notified a restart. A restart stops every jail, which
flushes its bans out of the firewall until they are restored from Fail2Ban's
database when the jail starts again, and forgets failures counted toward
maxretry. A reload applies the new settings to the running jails. service_jail
already reloads.

The Restart Fail2Ban handler is removed: nothing notifies it any more, and a
handler name is not part of the role's interface (#257). A new side_effect.yml
bans an address, records the daemon's PID and rewrites jail.local; verify
asserts the new maxretry is active, the ban is in force and the PID is
unchanged (the PID is what separates a reload from a restart, since bans are
restored from the database).

Assisted-by: Claude Code
2026-11-23 20:01:07 +00:00