https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • r

    runlolarun

    07/22/2022, 6:26 PM
    Hello, everyone. I cannot understand why this doesn’t work. I am getting error message
    Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'enable_only'
    . I found some articles that
    enable_only
    works in puppet > 5. We are running puppet 6. Thank you.
    package {
    'nvidia-driver-470':
    ensure      => '470-dkms',
    name        => 'nvidia-driver',
    provider    => 'dnfmodule',
    enable_only => true;
  • v

    vchepkov

    07/22/2022, 6:28 PM
    seems correct
  • b

    Brian Schonecker

    07/22/2022, 6:29 PM
    There's a semicolon at the end of enable_only.
  • b

    Brian Schonecker

    07/22/2022, 6:29 PM
    Is that valid/invalid?
  • v

    vchepkov

    07/22/2022, 6:29 PM
    I presume it's a beginning of the list
  • b

    Brian Schonecker

    07/22/2022, 6:34 PM
    @runlolarun are you on an OS that supports 'dnf'?
  • r

    runlolarun

    07/22/2022, 6:34 PM
    Yes, there are additional packages
  • r

    runlolarun

    07/22/2022, 6:34 PM
    Yes, RHEL based. Version 8.
  • r

    runlolarun

    07/22/2022, 6:36 PM
    if $facts['networking']['hostname'] =~/^node50[1,2]*/ {
    package {
    'nvidia-driver-470':
    ensure      => '470-dkms',
    name        => 'nvidia-driver',
    provider    => 'dnfmodule',
    enable_only => true;
    'nvidia-driver-NVML':
    ensure  => present,
    require => Package['nvidia-driver'];
    'cudatoolkit114-devel':
    ensure => present;
    }
    } else {
    package {
    'cudatoolkit117-devel':
    ensure => present;
    }
    }
  • b

    Brian Schonecker

    07/22/2022, 6:37 PM
    I got the same error on puppet agent v6.0.0-1 but NOT on puppet agent v7.
  • v

    vchepkov

    07/22/2022, 6:37 PM
    I have to point that it should require Package['nvidia-driver-470'], that's what you have in the catalog
  • c

    CVQuesty

    07/22/2022, 6:38 PM
    My friend that works at Apple still uses a defined type and pumps the password into an exec that just runs /usr/bin/dscl . -passwd /Users/username
  • r

    runlolarun

    07/22/2022, 6:38 PM
    Okay, thank you. But it shouldn’t be related to my error message, right?
  • b

    Brian Schonecker

    07/22/2022, 6:38 PM
    puppet-agent-6.15.0-1.el7.x86_64.rpm didn't have the issue, either.
  • b

    Brian Schonecker

    07/22/2022, 6:38 PM
    So somewhere between puppet-agent-6.0.0-1.el7.x86_64.rpm and puppet-agent-6.15.0-1.el7.x86_64.rpm it's fixed on RHEL7. Perhaps the same would apply for RHEL8.
  • r

    runlolarun

    07/22/2022, 6:39 PM
    @vchepkov I have nvidia-driver declared somewhere else as well.
  • v

    vchepkov

    07/22/2022, 6:39 PM
    ah, ok
  • r

    runlolarun

    07/22/2022, 6:39 PM
    my puppet server is 6.9, agent is 6.23.
  • r

    runlolarun

    07/22/2022, 6:40 PM
    I haven’t tested this on RHEL7 as there was no need. I guess a workaround is to run
    exec
    to disable the default module..?
  • v

    vchepkov

    07/22/2022, 6:41 PM
    what is the puppet agent on the server?
  • r

    runlolarun

    07/22/2022, 6:41 PM
    6.14
  • v

    vchepkov

    07/22/2022, 6:42 PM
    and for the heck of it,
    /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/dnfmodule.rb
    is there?
  • r

    runlolarun

    07/22/2022, 6:42 PM
    $ ls -la /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/dnfmodule.rb
    -rw-r--r--. 1 root root 2951 Mar  7  2020 /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/dnfmodule.rb
  • r

    runlolarun

    07/22/2022, 6:43 PM
    It works without
    enable_only
    .
  • v

    vchepkov

    07/22/2022, 6:43 PM
    maybe enable_only was added later
  • v

    vchepkov

    07/22/2022, 6:43 PM
    check into that file?
  • r

    runlolarun

    07/22/2022, 6:43 PM
    enable_only is not in that file.
  • v

    vchepkov

    07/22/2022, 6:44 PM
    most likely you need to upgrade
  • v

    vchepkov

    07/22/2022, 6:44 PM
    or you can create some fake module and put there dnfmodule.rb from a modern puppet
  • v

    vchepkov

    07/22/2022, 6:45 PM
    I am not sure if it's a available as a standalone module
1...103104105...428Latest