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
Hi,
I found deprecated messages in the ouput running chef-client in my nodes:
Deprecated features used!
method access to node attributes (node.foo.bar) is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]["bar"]) at 3 locations:
- /var/chef/cache/cookbooks/timezone-ii/recipes/linux-generic.rb:13:in from_file' - /var/chef/cache/cookbooks/timezone-ii/recipes/linux-generic.rb:14:in from_file'
- /var/chef/cache/cookbooks/timezone-ii/recipes/linux-generic.rb:24:in `from_file'
See https://docs.chef.io/deprecations_attributes.html for further details.
I've checked the url given and try to adapt the lines, (replacing for brackets) but no luck, even if the sintax is correct, when i run chef-client in the node, the message given is diferent :
Modified code:
timezone_data_file = File.join(node["timezone"]["tzdata_dir"], ["node.tz"])
localtime_path = node["timezone"]["localtime_path"]
ruby_block "confirm timezone" do
block {
unless File.exist?(timezone_data_file)
raise "Can't find #{timezone_data_file}!"
end
}
end
if node["timezone"]["use_symlink"]
link localtime_path do
He is the message after running chef-client in the node:
Recipe Compile Error in /var/chef/cache/cookbooks/base/recipes/default.rb
Errno::ENOENT
No such file or directory @ rb_sysopen - /usr/share/zoneinfo/node.tz
Hi,
I found deprecated messages in the ouput running chef-client in my nodes:
Deprecated features used!
method access to node attributes (node.foo.bar) is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]["bar"]) at 3 locations:
- /var/chef/cache/cookbooks/timezone-ii/recipes/linux-generic.rb:13:in
from_file' - /var/chef/cache/cookbooks/timezone-ii/recipes/linux-generic.rb:14:in
from_file'- /var/chef/cache/cookbooks/timezone-ii/recipes/linux-generic.rb:24:in `from_file'
See https://docs.chef.io/deprecations_attributes.html for further details.
I've checked the url given and try to adapt the lines, (replacing for brackets) but no luck, even if the sintax is correct, when i run chef-client in the node, the message given is diferent :
Modified code:
He is the message after running chef-client in the node:
So the codes explodes somwhere else.
How can i help to make this recipe compatible with Chef 12.6 (and 13 release) ?
I'm not proficient in ruby but i'm a quick learner.
Thanks.
Regards.
The text was updated successfully, but these errors were encountered: