Blob Blame History Raw
From 5e5957cd3d61eb6e869b6294b2d64a5c37f19803 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 26 Jan 2015 16:14:01 -0500
Subject: [PATCH 81/93] [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>
---
 sos/plugins/firewalld.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sos/plugins/firewalld.py b/sos/plugins/firewalld.py
index 31e8337..63fe058 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: et ts=4 sw=4
-- 
1.9.3