Bug 833046
Summary: | fail2ban: sometimes(frequently) fails to load iptable rules with multiple jails | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Leonard den Ottolander <leonard-rh-bugzilla> |
Component: | fail2ban | Assignee: | Orion Poplawski <orion> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | el6 | CC: | ali, leonard-rh-bugzilla, maxamillion, orion |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-12-10 15:52:40 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Leonard den Ottolander
2012-06-18 13:27:21 UTC
The patch mentioned above is for a different (also a timing) issue in server/action.py. I believe the first link in the Debian report to be the same issue as the one I'm reporting: http://sourceforge.net/tracker/?func=detail&aid=2870788&group_id=121032&atid=689044 that is iptables rules sometimes failing when starting multiple jails. This issue can apparently be fixed by adding a sleep to __processCmd() in fail2ban-client. (My confusion was caused by server/action.py sporting a function with the same name.) Adding a sleep before executing each start up command seems to fix this issue: --- fail2ban-client.000 2012-02-11 08:28:12.000000000 +0100 +++ fail2ban-client 2012-06-18 17:17:37.118368467 +0200 @@ -142,6 +142,7 @@ class Fail2banClient: def __processCmd(self, cmd, showRet = True): beautifier = Beautifier() for c in cmd: + time.sleep(0.1) beautifier.setInputCmd(c) try: client = CSocket(self.__conf["socket"]) See http://www.fail2ban.org/wiki/index.php/Fail2ban_talk:Community_Portal "fail2ban.actions.action ERROR on startup/restart". A cleaner solution would be to wait for client.send(c) to actually finish but that might require more code. Please test with https://admin.fedoraproject.org/updates/fail2ban-0.8.13-1.el6 and see if that helps. Sorry for responding so late. I haven't been paying attention to this issue since reporting it. As the issue was reported upstream and patched it is most likely fixed. You can close this bug report FIXED. If I do come across rules not being inserted again I will open a new bug report. Thanks. |