chef-boneyard / chef-provisioning-aws

AWS driver and resources for Chef that uses the AWS SDK
Apache License 2.0
142 stars 121 forks source link

Error when using a lazy attribute in bootstrap options #531

Closed bdrust closed 7 years ago

bdrust commented 7 years ago

I get the following error when executing setup on a machine_batch resource.

================================================================================ Error executing action setup on resource 'machine_batch[default]'

TypeError
---------
no _dump_data is defined for class Chef::DelayedEvaluator

Resource Declaration:
---------------------
# In /.chefdk/gem/ruby/2.3.0/gems/chef-provisioning-2.3.2/lib/chef/provisioning/recipe_dsl.rb

 62:         declare_resource(:machine_batch, name) do
 63:           from_recipe recipe
 64:           instance_eval(&block)
 65:         end
 66:       end

Compiled Resource:
------------------
# Declared in /.chefdk/gem/ruby/2.3.0/gems/chef-provisioning-2.3.2/lib/chef/provisioning/recipe_dsl.rb:62:in `machine_batch'

Stack Trace:

TypeError: machine_batch[default] (/.chefdk/gem/ruby/2.3.0/gems/chef-provisioning-2.3.2/lib/chef/provisioning/recipe_dsl.rb line 62) had an error: TypeError: no _dump_data is defined for class Chef::DelayedEvaluator
/.chefdk/gem/ruby/2.3.0/gems/chef-provisioning-aws-2.2.0/lib/chef/provisioning/aws_driver/driver.rb:1444:in `dump'
/.chefdk/gem/ruby/2.3.0/gems/chef-provisioning-aws-2.2.0/lib/chef/provisioning/aws_driver/driver.rb:1444:in `block (2 levels) in create_servers'
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:263:in `process_input'
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:253:in `process_one'
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/chef_fs/parallelizer.rb:93:in `call'
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/chef_fs/parallelizer.rb:93:in `worker_loop'
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `block in create_with_logging_context'
bdrust commented 7 years ago

Downgrading the chefdk 1.1.16 solved this issue for