Bug 515116 - logrotate restarts fail2ban resulting in early unbanning
Summary: logrotate restarts fail2ban resulting in early unbanning
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fail2ban
Version: 10
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Axel Thimm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-02 10:22 UTC by Eddie Lania
Modified: 2009-09-15 07:56 UTC (History)
1 user (show)

Fixed In Version: 0.8.4-23.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-04 04:03:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eddie Lania 2009-08-02 10:22:12 UTC
Description of problem:

/etc/logrotate.d/fail2ban has the following post-rotate command:

fail2ban reload 2>/dev/null

This will however purge the chains, even though some entries might have a bantime that is longer than the log rotation period.

http://www.fail2ban.org/wiki/index.php/Fail2ban:Community_Portal suggests:

logrotate configuration must run 'fail2ban-client set logtarget /var/log/fail2ban.log' instead of 'invoke-rc.d --quiet fail2ban reload' 


Version-Release number of selected component (if applicable):
fail2ban-0.8.3-18.fc10.noarch


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Eddie Lania 2009-08-13 10:34:10 UTC
This problem also persists in fc11.

Comment 2 Axel Thimm 2009-08-27 19:08:11 UTC
This is actually a bug with restarting fail2ban which forgets about its state. Since the next fail2ban package will use SYSLOG for logging there will not be any logrotate calls, but even if, I added the patch you suggested, thanks!

Comment 3 Fedora Update System 2009-08-27 20:28:15 UTC
fail2ban-0.8.3-21.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/fail2ban-0.8.3-21.fc10

Comment 4 Fedora Update System 2009-08-27 20:28:29 UTC
fail2ban-0.8.3-21.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/fail2ban-0.8.3-21.fc11

Comment 5 Fedora Update System 2009-08-28 21:58:59 UTC
fail2ban-0.8.3-21.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fail2ban'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9094

Comment 6 Fedora Update System 2009-08-28 21:59:57 UTC
fail2ban-0.8.3-21.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fail2ban'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9103

Comment 7 Fedora Update System 2009-09-04 04:02:47 UTC
fail2ban-0.8.3-22.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2009-09-11 10:57:12 UTC
fail2ban-0.8.4-23.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/fail2ban-0.8.4-23.fc11

Comment 9 Fedora Update System 2009-09-11 10:57:34 UTC
fail2ban-0.8.4-23.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/fail2ban-0.8.4-23.fc10

Comment 10 Fedora Update System 2009-09-15 07:49:53 UTC
fail2ban-0.8.4-23.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2009-09-15 07:55:59 UTC
fail2ban-0.8.4-23.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.