diff options
author | David Sommerseth <davids@redhat.com> | 2015-10-23 15:35:55 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2015-10-23 15:35:55 +0200 |
commit | d2df60c6cccc5a7aa10d311beb1528c08f505309 (patch) | |
tree | aa399cf173750e44d778697d6402c92b3577f96f | |
parent | 5b460a78e9ea685a628e990c2efaa20e28bb2023 (diff) | |
download | logactio-d2df60c6cccc5a7aa10d311beb1528c08f505309.tar.gz logactio-d2df60c6cccc5a7aa10d311beb1528c08f505309.tar.xz logactio-d2df60c6cccc5a7aa10d311beb1528c08f505309.zip |
IPTipset: Delay exit of __cleanup_iptables()
It may happen on some systems that the iptables command line
have completed removing ipset rules, but things aren't quite yet
ready. This adds a 5 seconds delay before ipset tries to remove
the ipset list.
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | LogActio/Reporters/IPTipset.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LogActio/Reporters/IPTipset.py b/LogActio/Reporters/IPTipset.py index 37fd595..97539c9 100644 --- a/LogActio/Reporters/IPTipset.py +++ b/LogActio/Reporters/IPTipset.py @@ -24,7 +24,7 @@ # are deemed to be part of the source code. # -import sys, os, subprocess, tempfile, re +import sys, os, subprocess, tempfile, re, time import LogActio.Message, LogActio.ReporterQueue @@ -287,6 +287,7 @@ class IPTipset(LogActio.ReporterQueue.ReporterQueue): # Clean up os.close(nullfp) del nullfp + time.sleep(5) # Allow iptables to complete its job before indicating we're done def __processqueue(self): |