Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split out forwarder and server into separate classes #48

Closed
wants to merge 1 commit into from

Conversation

yodermk
Copy link

@yodermk yodermk commented Jun 28, 2016

Hello,

We have a very weird issue with this class. We are on Linux and are ONLY trying to install the Splunk forwarder, not the main server. It turns out, however, that it has been trying to also instantiate the main server classes. We were getting an error on the license_splunk exec that the splunk command was not found.

@gregswift and I have been banging our heads on this for a couple days, and found out that it works if the two execs for the main Splunk server were removed from the path.

This would seem to indicate that somehow it is realizing wildcard services in a way that is inconsistent with how it is being called. We scrutinized our code and the code in this module, and can not find any code path that should be realizing these services.

We see this issue on Puppet 3. On our Puppet 2 standup (which is on its way out), it works as expected. We have not tried Puppet 4.

Obviously we're open to a better way to do this. Or it may be a bug in this module or in Puppet itself. We're just submitting this PR to give a heads up on the problem and to see if anyone else has hit it or has another idea for a solution.

Thank you!

where the server class execs are being executed inappropriately, causing
an error.
@gregswift
Copy link
Contributor

gregswift commented Jun 29, 2016

The error we were seeing:

Info: Applying configuration version '1467137689'
Error: Could not find command 'splunk'
Error: /Stage[main]/Splunk::Platform::Posix/Exec[license_splunk]/returns: change from notrun to 0 failed: Could not find command 'splunk'
Notice: /Stage[main]/Splunk::Platform::Posix/Exec[enable_splunk]: Dependency Exec[license_splunk] has failures: true
Warning: /Stage[main]/Splunk::Platform::Posix/Exec[enable_splunk]: Skipping because of failed dependencies
Notice: /Stage[main]/Splunk::Virtual/Service[splunk]: Dependency Exec[license_splunk] has failures: true
Warning: /Stage[main]/Splunk::Virtual/Service[splunk]: Skipping because of failed dependencies

We don't load the main splunk class... we were able to reproduce with just this block:

 # setup splunk params
    class { '::splunk::params':
      server   => $splunk_server,
    }

    # install splunk forwarder
    class { '::splunk::forwarder':
      pkg_provider => 'yum',
    }

I extracted the license_splunk relationships from the expanded_relationships.dot graph on puppet 2 and puppet3.
license_splunk_p2_exp_rel
license_splunk_p3_exp_rel

We are running Puppet 3.8.1. (thought we were on 3.8.7 but apparently thats just clients). One of our peer teams is on 3.8.5 and is not seeing the issue. We are going to update and see what happens.

@yodermk
Copy link
Author

yodermk commented Jun 29, 2016

Just updated to 3.8.7, same error.

@bastelfreak
Copy link
Member

Hi @yodermk, are you still interested in this PR? If so, can you take a look at the merge conflicts and rebase?

@bastelfreak bastelfreak reopened this Oct 10, 2016
@juniorsysadmin juniorsysadmin added needs-work not ready to merge just yet needs-rebase labels Jan 1, 2017
@yodermk
Copy link
Author

yodermk commented Jul 27, 2017

Crud, I didn't see this. Someone else attempted to update to upstream and did apparently get this problem again.
I'm on a different team now, and we're working on standing up Puppet 4. We will try the upstream module with that. If it doesn't work I will revisit this. Thanks!

@wyardley wyardley closed this Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase needs-work not ready to merge just yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants