Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple independent kernel modules deployment via single KMM Module #295

Closed
yevgeny-shnaidman opened this issue Feb 9, 2023 · 2 comments
Milestone

Comments

@yevgeny-shnaidman
Copy link
Contributor

yevgeny-shnaidman commented Feb 9, 2023

Currently KMM supports 2 mode for deploying kernel module/s via single KMM Module

  1. deploying one kernel module via a single Module (module name is specified in the spec)
  2. deploying multiple kernel modules, in case there is a symbols dependency between modules (as defined by module.dep). In this case the main module is specified in the Module, and running modprobe command on with that specific module will load all other modules that defines dependency for the main module

In case customer want to deploy multiple, independent kernel modules via single Module, the following sequence needs to be defined:

  1. create /etc/modprobe.d/softdep.conf file inside ModuleLoader image

  2. define dependency between kernel modules in the /etc/modprobe.d/softdep.conf file.
    Example: if customer has 3 modules in the image (simple-a, simple-b, simple-c) then the following definitions in the softdep.conf file will set the order of loading:

    softdep simple-a pre: simple-b
    softdep simple-b pre: simple-c
    

The order of loading will be: simple-c , then simple-b, then simple-a
The order of unloading will be reversed: simple-a , then simple-b, then simple-c

@ybettan
Copy link
Contributor

ybettan commented Feb 13, 2023

Maybe we can ease on the user by adding a ConfigMap entry to the API (as we are doing for dockerfile) in order to add this dependency file.

Then all we need to do is to write that file to the container's FS at /etc/modprobe.d/softdep.conf.

@yevgeny-shnaidman
Copy link
Contributor Author

yevgeny-shnaidman commented Feb 13, 2023

i don't see bug difference between creating ConfigMap with a specific format, and asking user to add the file with that specific format to DriverContainer image. But maybe we can add a field to the ModuleLoaderContainerSpec where user will define the order in simple terms, and then we will translate it into softdep.conf format, and use your idea with ConfigMap to insert it into ModuleLoader image. That way we hide implementation, and can change it if needed.
And it will also help in case we need to use in-cluster build

@qbarrand qbarrand added this to the Release 1.1 milestone Mar 8, 2023
@qbarrand qbarrand closed this as completed May 3, 2023
qbarrand pushed a commit to qbarrand/kernel-module-management that referenced this issue Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants