You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the setup_shclustering recipe on a cluster member.
Expected Result:
search head clustering is able to perform chef search query and assign the list of search head cluster members to the variable, shcluster_servers_list.
Actual Result:
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/etech_splunk_installer/recipes/default.rb
================================================================================
Chef::Exceptions::ImmutableAttributeModification
------------------------------------------------
Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/chef-splunk/recipes/setup_shclustering.rb:104:in `block in from_file'
/var/chef/cache/cookbooks/chef-splunk/recipes/setup_shclustering.rb:103:in `each'
/var/chef/cache/cookbooks/chef-splunk/recipes/setup_shclustering.rb:103:in `from_file'
/var/chef/cache/cookbooks/chef-splunk/recipes/server.rb:64:in `from_file'
/var/chef/cache/cookbooks/chef-splunk/recipes/default.rb:27:in `from_file'
/var/chef/cache/cookbooks/etech_splunk_installer/recipes/default.rb:23:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/chef-splunk/recipes/setup_shclustering.rb:
97: search(
98: :node,
99: "\
100: splunk_shclustering_enabled:true AND \
101: splunk_shclustering_label:#{node['splunk']['shclustering']['label']} AND \
102: chef_environment:#{node.chef_environment}"
103: ).each do |result|
104>> shcluster_servers_list << result['splunk']['shclustering']['mgmt_uri']
105: end
106: end
107:
108: execute 'bootstrap-shcluster' do
109: command "#{splunk_cmd} bootstrap shcluster-captain -servers_list '#{shcluster_servers_list.join(';')}' -auth '#{splunk_auth_info}'"
110: sensitive true
111: not_if { ::File.exist?("#{splunk_dir}/etc/.setup_shcluster") }
112: only_if { node['splunk']['shclustering']['mode'] == 'captain' }
113: notifies :restart, 'service[splunk]'
System Info:
------------
chef_version=15.6.10
platform=redhat
platform_version=8.1
ruby=ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
program_name=chef-client worker: ppid=9768;start=20:44:47;
executable=/opt/chef/embedded/bin/chef-client
Running handlers:
[2020-01-14T20:45:09+00:00] ERROR: Running exception handlers
- Chef::Handler::Datadog
Running handlers complete
[2020-01-14T20:45:09+00:00] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 21 seconds
[2020-01-14T20:45:09+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2020-01-14T20:45:09+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2020-01-14T20:45:09+00:00] ERROR: Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'
[2020-01-14T20:45:09+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef Infra Client run process exited unsuccessfully (exit code 1)
The text was updated successfully, but these errors were encountered:
Cookbook version
4.0.3
Chef-client version
15.6.10
Platform Details
Redhat 8
Steps to Reproduce:
Run the setup_shclustering recipe on a cluster member.
Expected Result:
search head clustering is able to perform chef search query and assign the list of search head cluster members to the variable,
shcluster_servers_list
.Actual Result:
The text was updated successfully, but these errors were encountered: