| Puppet Version: 7.17.0 Puppet Server Version: 7.2.1 OS Name/Version: RedHat 8 From the Nvidia CUDA package repository I changed the nvidia-driver module between different streams and found two issues:
- Stream named "latest" is not installed with "ensure => 'latest'"
- Cannot deal with conflicting packages when changing from one stream to another
Desired Behavior:
- If there is a stream "latest" and it is demanded with "ensure => 'latest'", it shall be installed
- Automatically deal with or allow to deal (e.g. using install_options) with conflicting packages when changing module stream
Actual Behavior: Check that no modules are installed:
[root@pt86test ~]# dnf module list --installed |
Last metadata expiration check: 2:31:22 ago on Mi 06 Jul 2022 13:40:09 CEST. |
[root@pt86test ~]# |
install stream '470':
package { 'nvidia-driver': |
ensure => '470', |
provider => 'dnfmodule', |
}
|
puppet agent run successful:
Notice: /Stage[main]/Profile::Nvidia::Cuda/Package[nvidia-driver]/ensure: created (corrective) |
... |
[root@pt86test ~]# dnf module list --installed |
Last metadata expiration check: 2:48:12 ago on Mi 06 Jul 2022 13:40:09 CEST. |
CUDA and drivers from Nvidia |
Name Stream Profiles Summary |
nvidia-driver 470 [e] default [d] [i], fm, ks, src Nvidia driver for 470 branch |
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled |
[root@pt86test ~]#
|
Now let's bump it to stream '510':
package { 'nvidia-driver': |
ensure => '510', |
provider => 'dnfmodule', |
}
|
perfect again:
Notice: /Stage[main]/Profile::Nvidia::Cuda/Package[nvidia-driver]/ensure: ensure changed '470' to '510' |
... |
[root@pt86test ~]# dnf module list --installed |
Last metadata expiration check: 2:53:26 ago on Mi 06 Jul 2022 13:40:09 CEST. |
CUDA and drivers from Nvidia |
Name Stream Profiles Summary |
nvidia-driver 510 [e] default [d] [i], fm, ks, src Nvidia driver for 510 branch |
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled |
[root@pt86test ~]#
|
now let's try stream 'latest'
package { 'nvidia-driver': |
ensure => 'latest', |
provider => 'dnfmodule', |
}
|
it does not do anything!
[root@pt86test ~]# dnf module list --installed |
Last metadata expiration check: 2:56:21 ago on Mi 06 Jul 2022 13:40:09 CEST. |
CUDA and drivers from Nvidia |
Name Stream Profiles Summary |
nvidia-driver 510 [e] default [d] [i], fm, ks, src Nvidia driver for 510 branch |
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled |
[root@pt86test ~]#
|
I guess "latest" has a special meaning and is not used as stream name. OK, let's try now stream '510-dkms':
package { 'nvidia-driver': |
ensure => '510-dkms', |
provider => 'dnfmodule', |
}
|
but here it is not happy at all:
Error: /Stage[main]/Profile::Nvidia::Cuda/Package[nvidia-driver]/ensure: change from 'purged' to '510-dkms' failed: Could not update: Execution of '/usr/bin/dnf module install -d 0 -e 1 -y nvidia-driver:510-dkms' returned 1: Error: |
Problem: problem with installed package kmod-nvidia-510.73.08-4.18.0-372.9.1-3:510.73.08-3.el8.x86_64 |
- package kmod-nvidia-510.73.08-4.18.0-372.9.1-3:510.73.08-3.el8.x86_64 conflicts with kmod-nvidia-latest-dkms provided by kmod-nvidia-latest-dkms-3:510.73.08-1.el8.x86_64 |
- conflicting requests (corrective)
|
a manual dnf run gives me following hint:
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
|
So '--allowerasing' it shall be:
package { 'nvidia-driver': |
ensure => '510-dkms', |
provider => 'dnfmodule', |
install_options => ['--allowerasing'], |
}
|
Exactly the same error, so install_options seam not to be supported:
Error: /Stage[main]/Profile::Nvidia::Cuda/Package[nvidia-driver]/ensure: change from 'purged' to '510-dkms' failed: Could not update: Execution of '/usr/bin/dnf module install -d 0 -e 1 -y nvidia-driver:510-dkms' returned 1: Error: |
Problem: problem with installed package kmod-nvidia-510.73.08-4.18.0-372.9.1-3:510.73.08-3.el8.x86_64 |
- package kmod-nvidia-510.73.08-4.18.0-372.9.1-3:510.73.08-3.el8.x86_64 conflicts with kmod-nvidia-latest-dkms provided by kmod-nvidia-latest-dkms-3:510.73.08-1.el8.x86_64 |
- conflicting requests (corrective)
|
Manual install with it works fine:
[root@pt86test ~]# dnf module install --allowerasing nvidia-driver:510-dkms |
... |
Installed: |
dkms-3.0.4-1.el8.noarch elfutils-libelf-devel-0.186-1.el8.x86_64 kmod-nvidia-latest-dkms-3:510.73.08-1.el8.x86_64 |
Removed: |
kmod-nvidia-510.73.08-4.18.0-372.9.1-3:510.73.08-3.el8.x86_64 |
|
Complete! |
[root@pt86test ~]#
|
And for completeness to show that there is actually a 'latest' stream:
[root@pt86test ]# dnf module install --allowerasing nvidia-driver:latest |
... |
[root@pt86test ~]# dnf module list --installed |
Last metadata expiration check: 0:01:02 ago on Mi 06 Jul 2022 17:28:41 CEST. |
CUDA and drivers from Nvidia |
Name Stream Profiles Summary |
nvidia-driver latest [e] default [d] [i], fm, ks, src Nvidia driver for latest branch |
|
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled |
[root@pt86test ~]#
|
|