diff -Nru sosreport-4.1/debian/changelog sosreport-4.1/debian/changelog --- sosreport-4.1/debian/changelog 2021-05-13 14:25:47.000000000 +0000 +++ sosreport-4.1/debian/changelog 2021-06-08 20:10:27.000000000 +0000 @@ -1,3 +1,10 @@ +sosreport (4.1-1ubuntu0.18.04.3) bionic; urgency=medium + + * d/p/0004-networking-check-presence-of-devlink.patch: + - Fix devlink module load by networking plugin (LP: #1923661) + + -- Heitor Alves de Siqueira Tue, 08 Jun 2021 20:10:27 +0000 + sosreport (4.1-1ubuntu0.18.04.2) bionic; urgency=medium * d/p/0003-ubuntu-policy-fix-upload.patch: diff -Nru sosreport-4.1/debian/patches/0004-networking-check-presence-of-devlink.patch sosreport-4.1/debian/patches/0004-networking-check-presence-of-devlink.patch --- sosreport-4.1/debian/patches/0004-networking-check-presence-of-devlink.patch 1970-01-01 00:00:00.000000000 +0000 +++ sosreport-4.1/debian/patches/0004-networking-check-presence-of-devlink.patch 2021-06-08 20:10:27.000000000 +0000 @@ -0,0 +1,60 @@ +From c90315e23c57255b9f7f4556374e454061d75014 Mon Sep 17 00:00:00 2001 +From: Eric Desrochers +Date: Tue, 13 Apr 2021 16:15:57 +0000 +Subject: [PATCH] [networking] check for the presence of devlink + +On certain kernel configuration, devlink cmds may trigger +the module to load automatically. + +Closes: #2468 +Resolves: #2487 + +Signed-off-by: Eric Desrochers +Signed-off-by: Jake Hunsaker +--- +Origin: upstream, https://github.com/sosreport/sos/commit/c90315e23c57 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1923661 + + sos/report/plugins/networking.py | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +Index: sosreport/sos/report/plugins/networking.py +=================================================================== +--- sosreport.orig/sos/report/plugins/networking.py 2021-06-08 20:09:43.314342047 +0000 ++++ sosreport/sos/report/plugins/networking.py 2021-06-08 20:09:43.313342017 +0000 +@@ -9,6 +9,7 @@ + from sos.report.plugins import (Plugin, RedHatPlugin, UbuntuPlugin, + DebianPlugin, SoSPredicate) + from os import listdir ++from os import path + + + class Networking(Plugin): +@@ -102,15 +103,20 @@ + "ip neigh show nud noarp", + "biosdevname -d", + "tc -s qdisc show", +- "devlink dev param show", +- "devlink dev info", + ]) + +- devlinks = self.collect_cmd_output("devlink dev") +- if devlinks['status'] == 0: +- devlinks_list = devlinks['output'].splitlines() +- for devlink in devlinks_list: +- self.add_cmd_output("devlink dev eswitch show %s" % devlink) ++ if path.isdir('/sys/class/devlink'): ++ self.add_cmd_output([ ++ "devlink dev param show", ++ "devlink dev info", ++ ]) ++ ++ devlinks = self.collect_cmd_output("devlink dev") ++ if devlinks['status'] == 0: ++ devlinks_list = devlinks['output'].splitlines() ++ for devlink in devlinks_list: ++ self.add_cmd_output("devlink dev eswitch show %s" % ++ devlink) + + # below commands require some kernel module(s) to be loaded + # run them only if the modules are loaded, or if explicitly requested diff -Nru sosreport-4.1/debian/patches/series sosreport-4.1/debian/patches/series --- sosreport-4.1/debian/patches/series 2021-05-13 14:25:41.000000000 +0000 +++ sosreport-4.1/debian/patches/series 2021-06-08 20:10:27.000000000 +0000 @@ -1,3 +1,4 @@ 0002-clean-prevent-parsing-ubuntu-user.patch 0001-debian-change-tmp-dir-location.patch 0003-ubuntu-policy-fix-upload.patch +0004-networking-check-presence-of-devlink.patch