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

[FEATURE] RHEL module stream named latest-kmod #7

Open
jcpunk opened this issue Jan 24, 2023 · 4 comments
Open

[FEATURE] RHEL module stream named latest-kmod #7

jcpunk opened this issue Jan 24, 2023 · 4 comments
Assignees

Comments

@jcpunk
Copy link

jcpunk commented Jan 24, 2023

My config management utility (puppet) is unable to distinguish between the module stream named latest and finding the most recent module stream ("latest"). On some hosts it picks up the dkms stream and on others the kmod stream, depending on when exactly it was run.

Can there be a stream named latest-kmod added so it is both explicit and something I can target?

@kmittman kmittman self-assigned this Jan 24, 2023
@kmittman kmittman added the enhancement New feature or request label Jan 24, 2023
@kmittman
Copy link
Collaborator

Hi @jcpunk

I see that Puppet has a dnfmodule provider. Have you looked at the ensure attribute (equiv to DNF module stream) and flavor attribute (equiv to DNF module profile)
So, I think that would be something like

{name: "nvidia-driver", ensure: "latest-dkms", flavor: "default", provider: :dnfmodule}

An alternative option could be Kickstart, which is "modules"-aware, see: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/#kickstart-installation

%packages
@^Minimal Install
@nvidia-driver:latest-dkms
%end

@kmittman kmittman removed the enhancement New feature or request label Jan 24, 2023
@jcpunk
Copy link
Author

jcpunk commented Jan 24, 2023

Alas, I'm trying to get the kmod stream and not the dkms one.

With the dnfmodule provider "latest" is interpreted as "get me the most recent" which then gets translated into "use the default" for some reason. There doesn't actually seem to be a way to tell puppet to use a DNF Module stream named "latest". If it happens to be the default stream, then it would work out but...

To be clear, I'm not asking to change the default stream.

Quick replication:

puppet apply -e "
package
{'nvidia-driver':   ensure   => 'latest',   flavor   => 'fm',   provider => 'dnfmodule', }
dnf module list
"

@kmittman
Copy link
Collaborator

Ohhh, I see. Because the string "latest" already has a special meaning to Puppet's ensure attribute, which itself is overloaded to support DNF's concept of module streams.

Hmm I wonder if that was intentional or something missed in this pull request.

Trying to jog my memory. I seem to recall a correspondence about kmod packages for Scientific Linux or Rocky Linux or maybe CentOS Stream...

So what I'm trying to ask is are these precompiled kmod packages coming from the CUDA repo or are they DIY using the .spec file in this (or related) GitHub repository ?


If they are DIY, then presumably you would already be generating your own modules YAML, in which case, the simplest option would be to add a CLI flag to genmodules.yaml to alter the latest stream name.

On the other hand, if you are simply consuming the CUDA repo packages and metadata as-is, then ...

  • changing the stream name latest -> latest-kmod (or something) would break existing users
  • adding a duplicate stream name would require a lot of changes to our test harness to account for the additional testing scenarios

So I think going to need to mull this around some more and maybe see if there is any response on the Puppet ticket you filed.

@jcpunk
Copy link
Author

jcpunk commented Jan 24, 2023 via email

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

2 participants