voxpupuli / puppet-systemd

Puppet module to manage systemd
https://forge.puppet.com/puppet/systemd
Apache License 2.0
52 stars 142 forks source link

Issue with hiera since v 7.0.0 #458

Closed ondrejv2 closed 2 months ago

ondrejv2 commented 2 months ago

Hello, Since I upgraded to 7.0.0 I seem to have an issue with hiera. My config:

node 'sloetxct003v.adwin.renesas.com' {
  include ::systemd
}
systemd::manage_units:
  user-.slice:
    unit_entry:
      Description: User session limits
    slice_entry:
      CPUWeight: 2000
      MemoryMax: '17G'

In Puppetfile I have:

mod 'puppetlabs-stdlib',                    '9.6.0'
mod 'puppet-systemd',               '7.0.0'

but still I receive compilation error on Puppet run:

Info: Using environment 'development'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Resource type not found: Stdlib::CreateResources (file: /etc/puppetlabs/code/environments/development/modules/systemd/manifests/init.pp, line: 205, column: 3) on node sloetxct003v.adwin.renesas.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I am pretty sure it did not behave like this with the previous version 6.6.0. Any ideas what could be wrong?

traylenator commented 2 months ago

You need to respect the minimum version of puppetlabs-stdlib:

https://github.com/voxpupuli/puppet-systemd/blob/v7.0.0/metadata.json#L12

https://github.com/puppetlabs/puppetlabs-stdlib/commit/e8ba623bbd7facbad726e9c56b39a8c5341c16c8

was added in some .9.6.0 but some other module may be holding older version ?

ondrejv2 commented 2 months ago

That was it! Changed version to 9.0.0 which happen to suffice old modules requirement as well as Puppet-systemd module. Thanks for the quick reply!