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

yum::versionlock doesn't work as documented #334

Open
vchepkov opened this issue Jul 28, 2024 · 1 comment
Open

yum::versionlock doesn't work as documented #334

vchepkov opened this issue Jul 28, 2024 · 1 comment

Comments

@vchepkov
Copy link

on RHEL9, when trying to implement versionlock, catalog fails to compile

profile::yum::versionlock:
  - candlepin-0:4.4.10-1.el9.*
  - candlepin-selinux-0:4.4.10-1.el9.*

  if $versionlock {
    $versionlock.each | String $v| {
      yum::versionlock { $v: }
    }
  }

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Package name must be formatted as Yum::RpmName, not 'String'. See Yum::Rpmname documentation for details. (file: /opt/puppetlabs/server/data/puppetserver/filesync/client/versioned-dirs/puppet-code/production_90afc15b2dd89dcb859edafd5768f4efb3da9462/modules/yum/manifests/versionlock.pp, line: 80, column: 7) (file: /etc/puppetlabs/puppetserver/code/environments/production/site/profile/manifests/yum.pp, line: 39) on node foreman.chepkov.lan

The strings are created by dnf versionlock command
@vchepkov
Copy link
Author

I have refactored, but imho, the previous parameters format should be accepted


profile::yum::versionlock:
  candlepin:
    version: 4.4.10
  candlepin-selinux:
    version: 4.4.10

  if $versionlock {
    $versionlock.each |String $package, Hash $attributes| {
      yum::versionlock { $package:
        * => $attributes,
      }
    }
  }

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

1 participant