Unknown resource type: 'mysql_user'
WhiskyLe opened this issue · 2 comments
Describe the Bug
When I try to use the mysql_user ill get an error that it can't find the resource mysql_user
The full error:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Unknown resource type: 'mysql_user' (file: /etc/puppetlabs/code/environments/production/modules/backup_system/manifests/client.pp, line: 67, column: 13)
this line refers to:
mysql_user { 'bareos-backup@localhost':
ensure => present,
password_hash => mysql::password($directorpassword),
}
Environment
- Platform Debian 12.5
- Puppet 8
- 10.11.6-MariaDB-0+deb12u1 Debian 12
my Puppetfile:
mod 'ntp',
:git => 'https://github.com/FrankVanDamme/puppetlabs-ntp.git',
:ref => 'debian12'
mod 'puppet-gitlab', '9.0.0'
mod 'puppet-opensearch', '1.1.0'
mod 'pcfens-filebeat', '4.14.0'
mod 'puppet-logstash', '8.0.0'
mod 'puppet-opensearch_dashboards', '1.0.0'
mod 'puppet-nginx', '5.0.0'
mod 'puppetlabs-mysql', '15.0.0'
mod 'puppetlabs-stdlib', '9.5.0'
mod 'puppetlabs-apt', '9.4.0'
mod 'puppet-archive', '7.0.0'
mod 'puppetlabs-concat', '9.0.2'
mod 'puppet-systemd', '6.0.0'
mod 'puppet-yum', '7.1.0'
mod 'puppet-elastic_stack', '9.0.0'
mod 'puppetlabs-inifile', '6.1.1'
mod 'jmkeyes-unifi', '0.0.3'
Additional Context
The module is loaded..
/etc/puppetlabs/code/environments/production/modules
├── backup_system (???)
├── jmkeyes-unifi (v0.0.3)
├── pcfens-filebeat (v4.14.0)
├── puppet-archive (v7.0.0)
├── puppet-elastic_stack (v9.0.0)
├── puppet-gitlab (v9.0.0)
├── puppet-logstash (v8.0.0)
├── puppet-mongodb (v5.0.0)
├── puppet-nginx (v5.0.0)
├── puppet-opensearch (v1.1.0)
├── puppet-opensearch_dashboards (v1.0.0)
├── puppet-systemd (v6.0.0)
├── puppetlabs-apt (v9.4.0)
├── puppetlabs-concat (v9.0.2)
├── puppetlabs-inifile (v6.1.1)
├── puppetlabs-mysql (v15.0.0)
├── puppetlabs-ntp (v10.1.0)
└── puppetlabs-stdlib (v9.5.0)
i also have a setting in my hiera:
mysql::server::override_options:
mysqld:
log-error: ~
The weird thing is I am sure that command worked a couple of weeks before on the same machine.
The mysql_user.rb file is also present in the module filesystem. does anyone have an idea on how to dig deeper into this?
The server installation works fine with the overwrite options as well. also the db command work till the user definition.
thanks
lgc
Without more information on your puppetserver setup, and how you manage code, my suspicion is you need to regenerate the types.
https://www.puppet.com/docs/puppet/8/environment_isolation.html