1
votes

I am getting compile error on poise cookbook . i started to get this error starting yesterday. was there any change done recently ? or do we have fix for this ??

=============================================================================== Recipe Compile Error in /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/libraries/default.rb

ArgumentError ------------- wrong number of arguments (given 2, expected 1)

Cookbook Trace: (most recent call first) ---------------------------------------- /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise/files/halite_gem/poise/helpers/option_collector.rb:98:in option_collector_attribute' /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise/files/halite_gem/poise/helpers/option_collector.rb:83:in attribute'
/Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise/files/halite_gem/poise/helpers/template_content.rb:143:in attribute' /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:67:in class:Resource'
/Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:39:in <module:PoiseArchive>' /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:28:in module:Resources'
/Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:25:in <module:PoiseArchive>' /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:24:in <top (required)>'
/Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources.rb:17:in <top (required)>' /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/cheftie.rb:17:in <top (required)>'
/Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise-archive/libraries/default.rb:19:in `<top (required)>'

Relevant File Content: ---------------------- /Users/admin/bootstrap/chef/conf/local-mode-cache/cache/cookbooks/poise/files/halite_gem/poise/helpers/option_collector.rb:

91: # @param name [String, Symbol] Name of the attribute to define. 92: # @param default [Hash] Default value for the options. 93: # @param parser [Proc, Symbol] Optional parser method. If a symbol it is 94: # called as a method on self. Takes a non-hash value and returns a 95: # hash of its parsed representation. 96: # @param forced_keys [Array, Set] Method names that will be forced 97:

to be options rather than calls to the parent resource. 98>> def option_collector_attribute(name, default: {}, parser: nil,

forced_keys: Set.new) 99: raise Poise::Error.new("Parser must be a Proc or Symbol: #{parser.inspect}") if parser && !(parser.is_a?(Proc) || parser.is_a?(Symbol)) 100: # Cast to a set at definition time. 101: forced_keys = Set.new(forced_keys) unless forced_keys.is_a?(Set) 102: # Never allow name to be called accidentally since it does really wonky things. 103: forced_keys.add(:name) 104: # Unlike LWRPBase.attribute, I don't care about Ruby 1.8. Worlds tiniest violin. 105: define_method(name.to_sym) do |arg=nil, &block| 106: iv_sym = :"@#{name}" 107:

System Info: ------------ chef_version=17.0.242 platform=mac_os_x platform_version=10.15.4 ruby=ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin18] program_name=/usr/local/bin//chef-client executable=/opt/chef/bin/chef-client

1
This error is caused by the latest version of chef (chef 17) which is release 28-April-2021. with this version poise-ruby cookbook fail . using older version of chef (chef-16) works smooth.mebb

1 Answers

0
votes

The poise-archive cookbook has been deprecated and archived for a long time:

https://github.com/poise/poise-archive

On Chef Infra 17.0 those poise_archive resources should be converted to archive_file resources which do not require an external cookbook:

https://docs.chef.io/resources/archive_file

The poise cookbooks being broken is not a bug which will be fixed.