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

systemd unit file in cookbook has diverged from splunk documentation #187

Closed
mlcooper opened this issue Oct 16, 2020 · 2 comments
Closed

Comments

@mlcooper
Copy link

In doing some work for number of open files on our splunk servers, I noticed that the systemd unit file in this cookbook has diverged from what splunk documents here, specifically in number 6:

https://docs.splunk.com/Documentation/Splunk/8.0.6/Workloads/Configuresystemd

Additionally, it says here that if you upgraded from splunk 7.3.x that was configured to use systemd, that when you upgrade to 8.0.0 it removes a property (User) that is current in the systemd unit file in this cookbook. The User property appears to be legacy since this cookbook is generally for splunk 8.x.x and higher.

haidangwa added a commit that referenced this issue Oct 17, 2020
  * a startup issue was resolved for SplunkForwarder installations with an improved
    systemd unit file (fix below)
  * Adds Inspec tests to verify from SplunkForwarder starts (thanks, @jjm)
- Fixes Issue [#187](#187)
  * the systemd unit file is now relegated to the `splunk enable boot-start` command to manage
- Adds Inspec tests and sets the verifier in Test Kitchen

Signed-off-by: Dang H. Nguyen <[email protected]>
@haidangwa haidangwa mentioned this issue Oct 17, 2020
4 tasks
@haidangwa
Copy link
Contributor

@mlcooper The documentation link you provided doesn't pertain to Splunk Enterprise itself. It is documentation to setup Splunk's Worload Management under systemd. I'm working on a change following this guide: https://docs.splunk.com/Documentation/Splunk/8.0.6/Admin/RunSplunkassystemdservice

haidangwa added a commit that referenced this issue Oct 18, 2020
  * a startup issue was resolved for SplunkForwarder installations with an improved
    systemd unit file (fix below)
  * Adds Inspec tests to verify from SplunkForwarder starts (thanks, @jjm)
- Fixes Issue [#187](#187)
  * the systemd unit file is now relegated to the `splunk enable boot-start` command to manage
- Adds Inspec tests and sets the verifier in Test Kitchen for some test suites; some are still in serverspec
- Render the user-seed.conf with a file resource rather than a template
- The default recipe no longer includes the disable recipe; to disable splunk, add `recipe[chef-splunk::disabled]` to a run list explicitly
- Disabling splunk will no longer uninstall Splunk Enterprise nor the Splunk Universal Forwarder
- Adds `#SecretsHelper` to aid with secrets rotation and maintaining idempotency for handling Splunk's hashed secret values
- Improved guards to prevent `service[splunk]` restart/start when it should be disabled.

Signed-off-by: Dang H. Nguyen <[email protected]>
@mlcooper
Copy link
Author

mlcooper commented Oct 20, 2020

I actually just realized that on the page you mentioned, https://docs.splunk.com/Documentation/Splunk/8.0.6/Admin/RunSplunkassystemdservice, if you scroll down to the "Configure systemd manually" section (here, https://docs.splunk.com/Documentation/Splunk/8.0.6/Admin/RunSplunkassystemdservice#Configure_systemd_manually) , there is a link that takes you to the Workload Management link that I originally mentioned in this issue.

haidangwa added a commit that referenced this issue Oct 20, 2020
* - Fixes Issue [#185](#185)
  * a startup issue was resolved for SplunkForwarder installations with an improved
    systemd unit file (fix below)
  * Adds Inspec tests to verify from SplunkForwarder starts (thanks, @jjm)
- Fixes Issue [#187](#187)
  * the systemd unit file is now relegated to the `splunk enable boot-start` command to manage
- Adds Inspec tests and sets the verifier in Test Kitchen for some test suites; some are still in serverspec
- Render the user-seed.conf with a file resource rather than a template
- The default recipe no longer includes the disable recipe; to disable splunk, add `recipe[chef-splunk::disabled]` to a run list explicitly
- Disabling splunk will no longer uninstall Splunk Enterprise nor the Splunk Universal Forwarder
- Adds `#SecretsHelper` to aid with secrets rotation and maintaining idempotency for handling Splunk's hashed secret values
- Improved guards to prevent `service[splunk]` restart/start when it should be disabled.

Signed-off-by: Dang H. Nguyen <[email protected]>

* fix some chefspecs

Signed-off-by: Dang H. Nguyen <[email protected]>

* updates test matrix in Github actions ci workflow
Signed-off-by: Dang H. Nguyen <[email protected]>

* fixes this error condition when executing the `#splunk_login_successful?` helper method:
```
    Errno::ENOENT
    -------------
    No such file or directory - /opt/splunk/bin/splunk
```

Signed-off-by: Dang H. Nguyen <[email protected]>

* fixes a typo: the question is "should_not" not "shuold_not"

Signed-off-by: Dang H. Nguyen <[email protected]>

* - uses `#splunk_secret_inspect` in the search head clustering server.conf.erb
- updates inspec
- disables Splunk's file locking verification on startup during Test Kitchen runs

Signed-off-by: Dang H. Nguyen <[email protected]>

* fixes inspec tests for uninstall_forwarder and server-cluster-master suites

Signed-off-by: Dang H. Nguyen <[email protected]>

* fixes inspec tests

Signed-off-by: Dang H. Nguyen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants