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

Support upgrading splunk forwarding and accepting ToS #269

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

treydock
Copy link
Contributor

@treydock treydock commented Dec 3, 2019

Pull Request (PR) description

Based on Splunk docs (https://docs.splunk.com/Documentation/SplunkCloud/8.0.0/User/UpgradeyourForwarders) the way to upgrade forwarders is manually or with a script and that script essentially stops and then starts splunk with --accept-license --assume-yes. This tries to mimic that behavior. The Exec should only be triggered if the forwarder is already installed.

Output from running this on my test and dev systems:

Notice: /Stage[main]/Splunk::Forwarder::Install/Package[splunkforwarder]/ensure: ensure changed '7.3.2-c60db69f8e32' to '0:7.3.3-7af3758d0d5e' (corrective)
Info: /Stage[main]/Splunk::Forwarder::Install/Package[splunkforwarder]: Scheduling refresh of Exec[splunk-forwarder-accept-tos]
Notice: /Stage[main]/Splunk::Forwarder::Service::Nix/Exec[splunk-forwarder-accept-tos]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Splunk::Forwarder::Service/Service[SplunkForwarder]/ensure: ensure changed 'stopped' to 'running' (corrective)
Info: /Stage[main]/Splunk::Forwarder::Service/Service[SplunkForwarder]: Unscheduling refresh on Service[SplunkForwarder]

The alternative to this PR is a Bolt task that handles the upgrade but the problem there is would get complicated to support all the ways Splunk forwarders can be installed (local RPM, local yum repo, etc).

@ghoneycutt
Copy link
Member

Suggest adding Style/TrailingCommaInArguments to the list of rubocops to ignore.

@treydock
Copy link
Contributor Author

Fixed rubocop issues

@bastelfreak bastelfreak added the enhancement New feature or request label Jan 30, 2020
@bastelfreak
Copy link
Member

thanks for the PR @treydock !

@bastelfreak bastelfreak merged commit 0ae1bcd into voxpupuli:master Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants