no implicit conversion of Chef::DelayedEvaluator into String
richardlock opened this issue · comments
Hi,
When using chef-client > 12.6, the logrotate_app definition gives TypeError:
no implicit conversion of Chef::DelayedEvaluator into String
This is happening when I use the chef-client cookbook which uses the logrotate cookbook.
Recipe: logrotate::default
* yum_package[logrotate] action install (up to date)
* directory[/etc/logrotate.d] action create (up to date)
Recipe: chef-client::config
* template[/etc/logrotate.d/chef-client] action create
================================================================================
Error executing action `create` on resource 'template[/etc/logrotate.d/chef-client]'
================================================================================
TypeError
---------
no implicit conversion of Chef::DelayedEvaluator into String
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/logrotate/definitions/logrotate_app.rb
63: template "/etc/logrotate.d/#{params[:name]}" do
64: source params[:template]
65: cookbook params[:cookbook]
66: mode params[:template_mode]
67: owner params[:template_owner]
68: group params[:template_group]
69: backup false
70: variables logrotate_config
71: end
72: else
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/logrotate/definitions/logrotate_app.rb:63:in `block in from_file'
template("/etc/logrotate.d/chef-client") do
params {:enable=>true, :frequency=>"weekly", :template=>"logrotate.erb", :cookbook=>"logrotate", :template_mode=>"0644", :template_owner=>"root", :template_group=>"root", :postrotate=>"systemctl reload chef-client.service >/dev/null || :", :prerotate=>nil, :firstaction=>nil, :lastaction=>nil, :sharedscripts=>false, :path=>["/var/log/chef/client.log"], :rotate=>12, :options=>["compress"], :name=>"chef-client"}
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
source "logrotate.erb"
cookbook "logrotate"
variables {:path=>"\"/var/log/chef/client.log\"", :frequency=>"weekly", :options=>["compress"], :compresscmd=>nil, :uncompresscmd=>nil, :compressext=>nil, :compressoptions=>nil, :create=>nil, :dateformat=>nil, :include=>nil, :mail=>nil, :extension=>nil, :maxage=>nil, :minsize=>nil, :maxsize=>nil, :rotate=>12, :size=>nil, :shredcycles=>nil, :start=>nil, :tabooext=>nil, :su=>nil, :olddir=>nil, :firstaction=>"", :prerotate=>"", :postrotate=>"systemctl reload chef-client.service >/dev/null || :", :lastaction=>"", :preremove=>""}
declared_type "template"
cookbook_name "chef-client"
recipe_name "config"
mode "0644"
owner "root"
group "root"
atomic_update #<Chef::DelayedEvaluator:0x000000036a71a8@/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.9.41/lib/chef/resource/file.rb:52>
path #<Chef::DelayedEvaluator:0x000000036942d8@/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.9.41/lib/chef/property.rb:177>
end
Platform:
---------
x86_64-linux
Running handlers:
Running handlers complete
Chef Client failed.
If I reinstall chef-client 12.6.x on the node, it completes the chef-client run successfully. If I then upgrade to a later chef-client version, the chef-client run fails again. Is this a known issue?
Thanks, Richard
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.