-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add the ability for driverdog to copy modules #119
Conversation
4d6663e
to
1ea7f6f
Compare
^ Fix clippy for Enum naming. |
1ea7f6f
to
4555c98
Compare
Updated the commit to reflect the two different configuration types: |
The expected behavior for link-modules and load-modules is to load all the modules from all the driver configuration files unless a specific modules set is specified. In the case that a modules set is specified, then driverdog should only link or load modules from the specified target configuration. The link logic worked this way but the load logic would always run the else clause, therefore always loading all modules even if only one was specified. Signed-off-by: Matthew Yeazel <[email protected]>
Overall I think the config driven by the enums seems quite clean and easy to follow. Nice work! |
4555c98
to
ad700fb
Compare
^ updated based upon @cbgbt comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
There are cases where modules could be included that are already linked but could be loaded by driverdog. This adds the ability to specify the command line argument copy-modules and improves the configuration format to allow configurations to either link or copy modules. Signed-off-by: Matthew Yeazel <[email protected]>
ad700fb
to
3fcf714
Compare
^ Fix the comments from @arnaldo2792 |
Issue number:
Related to # bottlerocket-os/bottlerocket#4172
Description of changes:
This PR fixes a bug in driverdog (see the first commit) and adds the ability for driverdog to read a configuration file that doesn't link. With that new logic it also supports a link option to only copy the drivers to the right place since some modules may already be linked, but still need to be loaded by driverdog. See bottlerocket-os/bottlerocket#4172 for more background.
Testing done:
Added unit tests to ensure the new loading of the file works for linking vs copying files. I also built an
aws-k8s-1.30-nvidia
AMI and ensured things still loaded correctly. More testing will come under the PR that combines all the work together to ensure the two drivers can be chosen at runtime.I also built on top of #118 for including both drivers and provided the following config file to make sure it works:
Which resulted in:
Note, to make this work we would need
nvidia-modeset.ko
andnvidia-peermem.ko
in the config file for it to fully work as intended.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.