Closed ColOfAbRiX closed 10 years ago
@ColOfAbRiX Thx
I have spotted the real problem.
I have edited some nodes using knife node from file and, after that operation, the node attributes are missing with no real reason. So, I think, it is an issue of Chef.
Solution/ideas?
Thanks.
This is a sample JSON file I use to configure my nodes:
{
"name" : "vmcolofabrix",
"json_class" : "Chef::Node",
"chef_type" : "node",
"chef_environment" : "personal",
"normal" : {
"tags" : [
"ColOfAbRIX"
]
},
"automatic" : {},
"default" : {},
"override" : {},
"run_list" : [
"role[common]"
]
}
I know this one's a bit of an oldie so this probably isn't of interest anymore, but questions deserve answers in the age of search engines.
In principle our validation code should be catching this sort of thing these days, but looking at your node object it appears to be missing several values that matter to chef-rundeck, such as platform, platform_family and kernel.
Hi, I have encountered a problem with chef-rundeck, the error is:
NoMethodError - undefined method
[]' for nil:NilClass: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-rundeck-1.0.1/lib/chef-rundeck.rb:62:in
block (2 levels) in class:ChefRundeck' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-rundeck-1.0.1/lib/chef-rundeck.rb:57:ineach' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-rundeck-1.0.1/lib/chef-rundeck.rb:57:in
block in class:ChefRundeck'My Chef-rundeck is running on the client as I will move it to the server when I have fully tested it. I am using SuSE Linux 11 SP3, Ruby 1.9.3 on both server and client, on the server is installed chef-server 11.0.8-1 and chef 11.6.0 and on the client chef 11.8.4
I debugged the file chef-rundeck-1.0.1/lib/chef-rundeck.rb and, referencing these lines:
at some point, the variable node doesn't contain the expected values. It's like it is not set for one of my nodes.
I think the script should check for all the values he uses before writing the output, so After the line
I added these lines:
I hope this helps!