Giter VIP home page Giter VIP logo

Comments (3)

jameslikeslinux avatar jameslikeslinux commented on August 15, 2024

I am seeing the same issue on my systems after trying to include the splunk::forwarder class, except in my case, the agent is trying to redefine a module with a Ruby dependency that isn't installed on the client, resulting in the agent run failing:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Warning: The a2mod provider is deprecated, please use apache::mod instead
Info: Redefining anchor in Puppet::Type
Info: Redefining file_line in Puppet::Type
Info: Redefining firewall in Puppet::Type
Info: Redefining firewallchain in Puppet::Type
Info: Redefining ini_setting in Puppet::Type
Error: Could not autoload puppet/provider/make_server_update/ruby: cannot load such file -- net/http/post/multipart
Error: Could not autoload puppet/type/splunk_config: Could not autoload puppet/provider/make_server_update/ruby: cannot load such file -- net/http/post/multipart
Error: Could not retrieve catalog from remote server: Could not intern from text/pson: Could not autoload puppet/type/splunk_config: Could not autoload puppet/provider/make_server_update/ruby: cannot load such file -- net/http/post/multipart
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

This is with Puppet 4.2.2 as bundled in the puppet-agent 1.2.5 package.

from puppet-splunk.

jameslikeslinux avatar jameslikeslinux commented on August 15, 2024

Looks like this is because the splunk_config type loads all of the types in the environment with:

# Require all of our types so the class names are resolvable for purging
Dir[File.dirname(__FILE__) + '/*.rb'].each do |file|
  require file unless file == __FILE__
end

It should be changed to just load the splunk types, like:

# Require all of our types so the class names are resolvable for purging
Dir[File.dirname(__FILE__) + '/splunk*.rb'].each do |file|
  require file unless file == __FILE__
end

I'll do some testing and submit a pull request.

from puppet-splunk.

treydock avatar treydock commented on August 15, 2024

@iamjamestl That change works, the only types getting redefined are splunk module types, oddly only a couple types get redefined.

Info: Loading facts
Info: Redefining splunkforwarder_input in Puppet::Type
Info: Redefining splunkforwarder_deploymentclient in Puppet::Type

from puppet-splunk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.