voxpupuli / puppet-splunk

Manage Splunk servers and forwarders using Puppet
https://forge.puppet.com/puppet/splunk
Apache License 2.0
41 stars 124 forks source link

Could not autoload puppet/type/splunk_config #256

Open madelaney opened 5 years ago

madelaney commented 5 years ago

Affected Puppet, Ruby, OS and module versions/distributions

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

In a Librarian puppet file add the entry:

mod 'puppet-splunk',
  git: 'https://github.com/voxpupuli/puppet-splunk.git',
  ref: 'master'

In a node apply:

class {
  splunk::params: 
    build => '7651b7244cf2',
    version => '7.3.1',
    root_url => 'https://internal.company.com'
}

include ::splunk::forwarder

What are you seeing

The catalog is not getting applied due to an issue with autoloading the module inifile.

What behaviour did you expect instead

I would expect to see Splunk applied to this machine.

Output log

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/splunk_config: Could not autoload puppet/provider/splunk_metadata/ini_setting: no such file to load -- puppet/util/ini_file (file: /etc/puppetlabs/code/thirdparty/splunk/manifests/params.pp, line: 313, column: 3) on node machine01.company.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Any additional information you'd like to impart

I did look at #239. so I double checked that my inifile module is < 3.0.0; and the inifile is at 2.5.0

    puppetlabs-inifile (2.5.0)
      puppetlabs-translate (< 2.0.0, >= 1.0.0)
barrymw commented 4 years ago

@madelaney , I was having similar issues. We are using r10k to manage the environment, and found subsequent puppet runs would have random autoload failures. I ended up tracking down some information about puppet generate types, which appears to have resolved our issue. Further information is available at https://puppet.com/docs/puppet/latest/environment_isolation.html