aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2015-01-26 16:14:01 -0500
committerBryn M. Reeves <bmr@redhat.com>2015-07-08 17:05:22 +0100
commitfac57721ae10dafec909c4fac408f42ebe23d4ac (patch)
treec9931aef2860c1ba0cc34715bc917cd948307bf3
parentf8a1746a871e560e548d21f1fc68067d452140a0 (diff)
downloadsos-fac57721ae10dafec909c4fac408f42ebe23d4ac.tar.gz
[firewalld] work around command hangs in container environments
Add a 10s timeout to firewalld-cmd execution to avoid long dbus timeouts in docker containers. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/firewalld.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sos/plugins/firewalld.py b/sos/plugins/firewalld.py
index 98d011b2..8eeb2b65 100644
--- a/sos/plugins/firewalld.py
+++ b/sos/plugins/firewalld.py
@@ -35,9 +35,11 @@ class FirewallD(Plugin, RedHatPlugin):
"/etc/sysconfig/firewalld"
])
+ # use a 10s timeout to workaround dbus problems in
+ # docker containers.
self.add_cmd_output([
"firewall-cmd --list-all-zones",
"firewall-cmd --permanent --list-all-zones"
- ])
+ ], timeout=10)
# vim: set et ts=4 sw=4 :