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

splunk_login_successful? helper method fails to send auth info to splunkd #204

Open
haidangwa opened this issue Mar 15, 2021 · 0 comments
Open

Comments

@haidangwa
Copy link
Contributor

haidangwa commented Mar 15, 2021

👻 Brief Description

#splunk_login_successful? helper method contains an interpolation error resulting in the static string node.run_state['splunk_auth_info'] being passed to #splunk_cmd instead of the actual value of the run_state attribute.

         Mixlib::ShellOut::CommandTimeout
         --------------------------------
         Command timed out after 600s:
         Command exceeded allowed execution time, process terminated
         ---- Begin output of su - splunk -c '/opt/splunk/bin/splunk login -auth node.run_state['splunk_auth_info']' ----
         STDOUT: 
         STDERR: Session terminated, killing shell... ...killed.
         ---- End output of su - splunk -c '/opt/splunk/bin/splunk login -auth node.run_state['splunk_auth_info']' ----
         Ran su - splunk -c '/opt/splunk/bin/splunk login -auth node.run_state['splunk_auth_info']' returned 
         
         Cookbook Trace: (most recent call first)
         ----------------------------------------
           /tmp/kitchen/cache/cookbooks/chef-splunk/libraries/helpers.rb:113:in `splunk_login_successful?'
           /tmp/kitchen/cache/cookbooks/chef-splunk/recipes/setup_auth.rb:33:in `block in from_file'
           /tmp/kitchen/cache/cookbooks/chef-splunk/recipes/setup_auth.rb:32:in `from_file'
           /tmp/kitchen/cache/cookbooks/chef-splunk/recipes/service.rb:50:in `from_file'
           /tmp/kitchen/cache/cookbooks/chef-splunk/recipes/server.rb:23:in `from_file'
           /tmp/kitchen/cache/cookbooks/chef-splunk/recipes/default.rb:29:in `from_file'

🥞 Cookbook version

7.1.0

Steps To Reproduce

Steps to reproduce the behavior:
Execute the chef-splunk::default recipe in a run list

🚓 Expected behavior

the splunkd auth info should be valid and be able to authenticate with splunkd

haidangwa added a commit to haidangwa/chef-splunk that referenced this issue Mar 15, 2021
haidangwa added a commit to haidangwa/chef-splunk that referenced this issue Mar 15, 2021
@ramereth ramereth linked a pull request Mar 16, 2021 that will close this issue
3 tasks
haidangwa added a commit to haidangwa/chef-splunk that referenced this issue May 12, 2021
… message for your changes. Lines starting

- addresses linting issues
- fixes an issue with the `user-seed.conf` file
- ensures that splunk is installed prior to anything in the `chef-splunk::service` recipe executes
- fixes Chef Delivery job in Github Actions: checks out `main` branch instead of `master` branch

Signed-off-by: Dang H. Nguyen <dang.nguyen@disney.com>
haidangwa added a commit to haidangwa/chef-splunk that referenced this issue May 12, 2021
… message for your changes. Lines starting

- addresses linting issues
- fixes an issue with the `user-seed.conf` file
- ensures that splunk is installed prior to anything in the `chef-splunk::service` recipe executes
- fixes Chef Delivery job in Github Actions: checks out `main` branch instead of `master` branch

Signed-off-by: Dang H. Nguyen <dang.nguyen@disney.com>
haidangwa added a commit to haidangwa/chef-splunk that referenced this issue May 14, 2021
… message for your changes. Lines starting

- Addresses linting issues
- Fixes an issue with the `user-seed.conf` file
- Ensures that splunk is installed prior to anything in the `chef-splunk::service` recipe executes
- Fixes Chef Delivery job in Github Actions: checks out `main` branch instead of `master` branch
- Changes the `#systemd?` helper method to remove the reliance on the node data (workaround to a Chef 17 compatibility issue)
- Removes `chef-vault` as a dependency in the metadata.rb, as chef-vault was included in Chef Infra Client 13.4+
- Increase the minimum supported Chef version to 15.3 for unified mode

Signed-off-by: Dang H. Nguyen <dang.nguyen@disney.com>
haidangwa added a commit to haidangwa/chef-splunk that referenced this issue May 18, 2021
damacus added a commit to haidangwa/chef-splunk that referenced this issue Sep 1, 2021
haidangwa added a commit to haidangwa/chef-splunk that referenced this issue Dec 2, 2021
- Fixes an issue with the `user-seed.conf` file
- Ensures that splunk is installed prior to anything in the `chef-splunk::service` recipe executes

Signed-off-by: Dang H. Nguyen <dang.nguyen@disney.com>
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

Successfully merging a pull request may close this issue.

1 participant