diff options
author | Patrick Talbert <ptalbert@redhat.com> | 2019-04-04 13:31:07 +0200 |
---|---|---|
committer | Pavel Moravec <pmoravec@redhat.com> | 2019-08-26 18:29:54 +0200 |
commit | 2159b86f9df4b66f3cbff7e2ab4c60a7ddf6d9ec (patch) | |
tree | f9f5e5ac192c56691b0d66f036c73d63856948ee | |
parent | f7b74072acf4a26247399efda5b6111d3c5a7743 (diff) | |
download | sos-2159b86f9df4b66f3cbff7e2ab4c60a7ddf6d9ec.tar.gz |
[ipvs] Only run ipvsadm commands if the ip_vs kernel module is loaded
Running any ipvsadm command can cause the kernel to autoload the
ip_vs module. So only run ipvsadm commands if the ip_vs kernel module
is found to already be loaded on the system.
Resolves: #1634
Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/plugins/ipvs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sos/plugins/ipvs.py b/sos/plugins/ipvs.py index 6868388f..a2669588 100644 --- a/sos/plugins/ipvs.py +++ b/sos/plugins/ipvs.py @@ -8,7 +8,7 @@ # # See the LICENSE file in the source distribution for further information. -from sos.plugins import Plugin, RedHatPlugin, DebianPlugin +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, SoSPredicate class Ipvs(Plugin, RedHatPlugin, DebianPlugin): @@ -29,6 +29,6 @@ class Ipvs(Plugin, RedHatPlugin, DebianPlugin): "ipvsadm -Ln --stats", "ipvsadm -Ln --thresholds", "ipvsadm -Ln --timeout" - ]) + ], pred=SoSPredicate(self, kmods=['ip_vs'])) # vim: set et ts=4 sw=4 : |