aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2020-01-16 10:35:16 +0100
committerJake Hunsaker <jhunsake@redhat.com>2020-01-27 12:57:03 -0500
commit428918b5550e9efb9f12967f494c19b5daa672b8 (patch)
tree346a4a00a77b6c97acf12045a131a45f40df7971
parent0169be60e46fe0c25ef93717d9209cb28064b911 (diff)
downloadsos-428918b5550e9efb9f12967f494c19b5daa672b8.tar.gz
[firewalld] put "nft list ruleset" under kmods predicate
Executing "nft list ruleset" loads kernel modules nf_tables and nfnetlink. Sosreport should call it only under the kmods=[nf_tables,nfnetlink] predicate. Resolves: #1919 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/plugins/firewalld.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sos/plugins/firewalld.py b/sos/plugins/firewalld.py
index 26731fd3..f7b41c4a 100644
--- a/sos/plugins/firewalld.py
+++ b/sos/plugins/firewalld.py
@@ -9,7 +9,7 @@
#
# See the LICENSE file in the source distribution for further information.
-from sos.plugins import Plugin, RedHatPlugin
+from sos.plugins import Plugin, RedHatPlugin, SoSPredicate
class FirewallD(Plugin, RedHatPlugin):
@@ -33,7 +33,10 @@ class FirewallD(Plugin, RedHatPlugin):
])
# collect nftables ruleset
- self.add_cmd_output("nft list ruleset")
+ nft_pred = SoSPredicate(self,
+ kmods=['nf_tables', 'nfnetlink'],
+ required={'kmods': 'all'})
+ self.add_cmd_output("nft list ruleset", pred=nft_pred, changes=True)
# use a 10s timeout to workaround dbus problems in
# docker containers.