From 64977c079d3c41645fb8697fb74a705456ce50ff Mon Sep 17 00:00:00 2001 From: Jose Castillo Date: Fri, 10 Nov 2023 15:21:38 +0000 Subject: [PATCH] [ebpf] Check for bpftool presence before running plugin The plugin was running even when the bpftool was not present, throwing an exception when it tried to parse a json output: INFO: [plugin:ebpf] Could not parse bpftool prog list as JSON: Expecting value: line 1 column 1 (char 0) It now checks if the program is present before running any command at all. Related: RH SUPDEV-151 Signed-off-by: Jose Castillo --- sos/report/plugins/ebpf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sos/report/plugins/ebpf.py b/sos/report/plugins/ebpf.py index 6c5f7deea8..56edb53248 100644 --- a/sos/report/plugins/ebpf.py +++ b/sos/report/plugins/ebpf.py @@ -15,6 +15,7 @@ class Ebpf(Plugin, IndependentPlugin): short_desc = 'eBPF tool' plugin_name = 'ebpf' profiles = ('system', 'kernel', 'network') + commands = ('bpftool',) option_list = [ PluginOpt("namespaces", default=None, val_type=int,