-
Notifications
You must be signed in to change notification settings - Fork 253
reload Provision fails due to poise #149
Description
Hi.
After some time I need to create a new domain in my vagrant-lamp box so I've updated the database and tried to reprovision.
The problem is that reprovision fails due to poise (ruby) with a compiling error.
=> default: ================================================================================ ==> default: Recipe Compile Error in /var/chef/cache/cookbooks/poise-python/libraries/default.rb ==> default: ================================================================================ ==> default: ==> default: ==> default: FrozenError ==> default: ----------- ==> default: can't modify frozen Array ==> default: ==> default: ==> default: Cookbook Trace: ==> default: --------------- ==> default: /var/chef/cache/cookbooks/poise/files/halite_gem/poise/helpers/subresources/container.rb:220:in included'
==> default:
==> default: /var/chef/cache/cookbooks/poise/files/halite_gem/poise/resource.rb:51:in include' ==> default: ==> default: /var/chef/cache/cookbooks/poise/files/halite_gem/poise/resource.rb:51:in poise_subresource_container'
==> default:
==> default: /var/chef/cache/cookbooks/poise/files/halite_gem/poise.rb:93:in block in Poise' ==> default: ==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime.rb:34:in include'
==> default:
==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime.rb:34:in <class:Resource>' ==> default: ==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime.rb:33:in module:PythonRuntime'
==> default:
==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime.rb:25:in <module:Resources>' ==> default: ==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime.rb:22:in module:PoisePython'
==> default:
==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_runtime.rb:21:in <top (required)>' ==> default: ==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources.rb:19:in <top (required)>'
==> default:
==> default: /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/cheftie.rb:17:in <top (required)>' ==> default: ==> default: /var/chef/cache/cookbooks/poise-python/libraries/default.rb:19:in <top (required)>'
==> default:
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default:
==> default: /var/chef/cache/cookbooks/poise/files/halite_gem/poise/helpers/subresources/container.rb:
==> default:
==> default: 213: @container_default
==> default: 214: end
==> default: 215: end
==> default: 216:
==> default: 217: def included(klass)
==> default: 218: super
==> default: 219: klass.extend(ClassMethods)
==> default: 220>> klass.const_get(:HIDDEN_IVARS) << :@subcontexts
==> default: 221: klass.const_get(:FORBIDDEN_IVARS) << :@subcontexts
==> default: 222: end
==> default: 223: end
==> default: 224:
==> default: 225: extend ClassMethods
==> default: 226: end
==> default: 227: end
==> default: 228: end
==> default: 229: end
==> default:
==> default: Additional information:
==> default: -----------------------
==> default: Ruby objects are often frozen to prevent further modifications
==> default: when they would negatively impact the process (e.g. values inside
==> default: Ruby's ENV class) or to prevent polluting other objects when default
==> default: values are passed by reference to many instances of an object (e.g.
==> default: the empty Array as a Chef resource default, passed by reference
==> default: to every instance of the resource).
==> default:
==> default: Chef uses Object#freeze to ensure the default values of properties
==> default: inside Chef resources are not modified, so that when a new instance
==> default: of a Chef resource is created, and Object#dup copies values by
==> default: reference, the new resource is not receiving a default value that
==> default: has been by a previous instance of that resource.
==> default:
==> default: Instead of modifying an object that contains a default value for all
==> default: instances of a Chef resource, create a new object and assign it to
==> default: the resource's parameter, e.g.:
==> default:
==> default: fruit_basket = resource(:fruit_basket, 'default')
==> default:
==> default: # BAD: modifies 'contents' object for all new fruit_basket instances
==> default: fruit_basket.contents << 'apple'
==> default:
==> default: # GOOD: allocates new array only owned by this fruit_basket instance
==> default: fruit_basket.contents %w(apple)
==> default:
==> default:
==> default: System Info:
==> default: ------------
==> default: chef_version=14.5.33
==> default: platform=ubuntu
==> default: platform_version=16.04
==> default: ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
==> default: program_name=/usr/bin/chef-client
==> default: executable=/opt/chef/bin/chef-client
==> default:`
It seems the problem is related to poise at it is mentioned here.
Any alternative?
Thank you!