Skip to content

Commit da90f67

Browse files
TELCODOCS-1847: Make it possible to unload several kmods
1 parent 25a77b4 commit da90f67

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

modules/kmm-replacing-in-tree-modules-with-out-of-tree-modules.adoc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You can use Kernel Module Management (KMM) to build kernel modules that can be l
1010

1111
Dynamically loaded modules include in-tree modules and out-of-tree (OOT) modules. In-tree modules are internal to the Linux kernel tree, that is, they are already part of the kernel. Out-of-tree modules are external to the Linux kernel tree. They are generally written for development and testing purposes, such as testing the new version of a kernel module that is shipped in-tree, or to deal with incompatibilities.
1212

13-
Some modules loaded by KMM could replace in-tree modules already loaded on the node. To unload an in-tree module before loading your module, set the `.spec.moduleLoader.container.inTreeModuleToRemove` field. The following is an example for module replacement for all kernel mappings:
13+
Some modules that are loaded by KMM could replace in-tree modules that are already loaded on the node. To unload in-tree modules before loading your module, set the value of the `.spec.moduleLoader.container.inTreeModulesToRemove` field to the modules that you want to unload. The following example demonstrates module replacement for all kernel mappings:
1414

1515
[source,yaml]
1616
----
@@ -21,12 +21,10 @@ spec:
2121
modprobe:
2222
moduleName: mod_a
2323
24-
inTreeModuleToRemove: mod_b
24+
inTreeModulesToRemove: [mod_a, mod_b]
2525
----
2626

27-
In this example, the `moduleLoader` pod uses `inTreeModuleToRemove` to unload the in-tree `mod_b` before loading `mod_a`
28-
from the `moduleLoader` image.
29-
When the `moduleLoader`pod is terminated and `mod_a` is unloaded, `mod_b` is not loaded again.
27+
In this example, the `moduleLoader` pod uses `inTreeModulesToRemove` to unload the in-tree `mod_a` and `mod_b` before loading `mod_a` from the `moduleLoader` image. When the `moduleLoader`pod is terminated and `mod_a` is unloaded, `mod_b` is not loaded again.
3028

3129
The following is an example for module replacement for specific kernel mappings:
3230

@@ -38,6 +36,6 @@ spec:
3836
container:
3937
kernelMappings:
4038
- literal: 6.0.15-300.fc37.x86_64
41-
containerImage: some.registry/org/my-kmod:6.0.15-300.fc37.x86_64
42-
inTreeModuleToRemove: <module_name>
39+
containerImage: "some.registry/org/my-kmod:${KERNEL_FULL_VERSION}"
40+
inTreeModulesToRemove: [<module_name>, <module_name>]
4341
----

0 commit comments

Comments
 (0)