[sos41][networking] May invoke devlink module when not loaded depending on how the kernel is configured
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sosreport (Ubuntu) |
Fix Released
|
Medium
|
Eric Desrochers | ||
Bionic |
Fix Released
|
Medium
|
Heitor Alves de Siqueira | ||
Focal |
Fix Released
|
Medium
|
Heitor Alves de Siqueira | ||
Groovy |
Won't Fix
|
Medium
|
Heitor Alves de Siqueira | ||
Hirsute |
Fix Released
|
Medium
|
Heitor Alves de Siqueira |
Bug Description
[Impact]
sos's networking plugin may trigger the devlink kernel module to load. We don't want sos to modify/change/alter the state of a machine whatsoever, especially during troubleshooting. But it may be the case for the networking plugin, depending on the running kernel configuration.
As a side note, this is also causing Bionic autopkgtest to fails as it is tested w/ 4.15 series kernel by default. 'simple.sh' (sos testsuite part of the autopkgtest) will report a failure as follows:
"new kernel modules loaded during execution"
[Test case]
On a 4.15 kernel (Bionic)
On a bare metal system:
root@srv:~# lsmod | grep -i devlink
root@srv:~# sos report -o networking
root@srv:~# lsmod | grep -i devlink
devlink 45056 0
Not reproducible on Bionic w/ 5.4 kernel for instance
Reason:
config-
config-
CONFIG_
Drivers using the devlink infrastructure should have a dependency on MAY_USE_DEVLINK to ensure they do not cause link errors when devlink is a loadable module and the driver using it is built-in.
[Where problem could occur]
The fix first checks for /sys/class/devlink before adding the devlink commands to the networking plugin. If this path changes in future kernels, or it becomes possible to collect devlink information without this path being present, we'll miss that information in sosreports. It's also possible that in future kernels, additional modules get loaded due to the devlink commands, so we should also be on the lookout for those changing the system state between sos executions.
The above are very unlikely scenarios in any case, and we should get previous notice of such changes. The patchset will also be tested with the now fixed autopkgtests, and that should give a bit more confidence in the fixes.
[Other information]
This is fixed by upstream commit:
- c90315e23c57 "[networking] check for the presence of devlink"
Upstream issues:
https:/
tags: | added: seg sts |
description: | updated |
summary: |
[sos41] networking plugin may invoke devlink module when not loaded - depending on how the kernel is configure + depending on how the kernel is configured |
summary: |
- [sos41] networking plugin may invoke devlink module when not loaded - depending on how the kernel is configured + [sos41][networking] May invoke devlink module when not loaded depending + on how the kernel is configured |
description: | updated |
Changed in sosreport (Ubuntu Hirsute): | |
assignee: | nobody → Eric Desrochers (slashd) |
status: | New → In Progress |
description: | updated |
description: | updated |
Changed in sosreport (Ubuntu Groovy): | |
status: | New → In Progress |
Changed in sosreport (Ubuntu Focal): | |
status: | New → In Progress |
Changed in sosreport (Ubuntu Bionic): | |
status: | New → In Progress |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in sosreport (Ubuntu Focal): | |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in sosreport (Ubuntu Groovy): | |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in sosreport (Ubuntu Bionic): | |
assignee: | Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves) |
Changed in sosreport (Ubuntu Focal): | |
assignee: | Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves) |
Changed in sosreport (Ubuntu Groovy): | |
assignee: | Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves) |
Changed in sosreport (Ubuntu Hirsute): | |
assignee: | Eric Desrochers (slashd) → Heitor Alves de Siqueira (halves) |
description: | updated |
Changed in sosreport (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in sosreport (Ubuntu Groovy): | |
importance: | Undecided → Medium |
Changed in sosreport (Ubuntu Hirsute): | |
importance: | Undecided → Medium |
Changed in sosreport (Ubuntu Focal): | |
importance: | Undecided → Medium |
description: | updated |
Changed in sosreport (Ubuntu Groovy): | |
status: | In Progress → Won't Fix |
Changed in sosreport (Ubuntu): | |
importance: | Undecided → Medium |
This bug was fixed in the package sosreport - 4.1-1ubuntu2
---------------
sosreport (4.1-1ubuntu2) impish; urgency=medium
* d/p/series:
- Re-order patches in numerical order.
* d/p/0003- ubuntu- policy- fix-upload. patch:
- Fix sos archive upload to UA Canonical server
(LP: #1923209)
* d/p/0004- chrony- configuration- can-now- be-fragmented. patch:
- Chrony 4.0, first introduced in Hirsute, support
fragmented configuration.
* d/p/0005- global- drop-plugin- version. patch:
- Removal of plugins versionning features as it generate
unhelpful noise. (LP: #1922925)
* d/p/0006- networking- check-presence- of-devlink. patch:
- On certain kernel configuration, devlink cmds may
trigger the module to load automatically. This will
also prevent simple.sh, part of the autopkgtest, in
Bionic to fail due to devlink kernel conf in 4.15.
(LP: #1923661)
* d/p/0007- sosnode- avoid-checksum- cleanup- if-no-archive. patch:
- Fixes an exception propagation from `cleanup()`
where an attempt to look for and remove a checksum
file was made when an archive was not generated.
(LP: #1923641)
-- Eric Desrochers <email address hidden> Mon, 26 Apr 2021 15:34:42 -0400