voxpupuli / puppet-rabbitmq

RabbitMQ Puppet Module
http://forge.puppetlabs.com/puppet/rabbitmq
Apache License 2.0
171 stars 500 forks source link

Literal Type errors #973

Closed corvar closed 8 months ago

corvar commented 8 months ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

class { 'rabbitmq':
  delete_guest_user => true,
  python_package    => 'python-is-python3',
}

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Language validation logged 2 errors. Giving up (file: /etc/puppetlabs/code/environments/production/modules/rabbitmq/manifests/init.pp) on node rmq001-xxxxx.xxxxxxx.xxx

What behaviour did you expect instead

A clean up

Output log

2024-03-14T00:00:23.802-05:00 ERROR [qtp658586553-954382] [puppetserver] Puppet The parameter '$file_limit' must be a literal type, not a Puppet::Pops::Model::AccessExpression (file: /etc/puppetlabs/code/environments/production/modules/rabbitmq/manifests/init.pp, line: 435, column: 88) 2024-03-14T00:00:23.803-05:00 ERROR [qtp658586553-954382] [puppetserver] Puppet The parameter '$oom_score_adj' must be a literal type, not a Puppet::Pops::Model::AccessExpression (file: /etc/puppetlabs/code/environments/production/modules/rabbitmq/manifests/init.pp, line: 436, column: 24) 2024-03-14T00:00:23.808-05:00 ERROR [qtp658586553-954382] [puppetserver] Puppet Evaluation Error: Error while evaluating a Resource Statement, Language validation logged 2 errors. Giving up (file: /etc/puppetlabs/code/environments/production/modules/rabbitmq/manifests/init.pp) on node rmq001-xxxxx.xxxxxxx.xxx

Any additional information you'd like to impart

Changing the type in the module's init.pp to a literal type, resolves the error. Though the literal type I specified is much more restricted than it should be.

Integer[1, 65535] $file_limit = 16384, Integer[0, 1000] $oom_score_adj = 0,

wyardley commented 8 months ago

I think a dupe of #971 and #972? https://github.com/puppetlabs/puppet/issues/9268