Closed askmike1 closed 2 years ago
Just ran into this too -- the consul
cookbook is the only thing depending on poise-archive
and it causes the chef run to fail:
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/poise-archive/libraries/default.rb
================================================================================
ArgumentError
-------------
wrong number of arguments (given 2, expected 1)
Cookbook Trace: (most recent call first)
----------------------------------------
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/option_collector.rb:98:in `option_collector_attribute'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/option_collector.rb:83:in `attribute'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/template_content.rb:143:in `attribute'
/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:67:in `<class:Resource>'
/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:39:in `<module:PoiseArchive>'
/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:28:in `<module:Resources>'
/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:25:in `<module:PoiseArchive>'
/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources/poise_archive.rb:24:in `<top (required)>'
/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/resources.rb:17:in `<top (required)>'
/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/cheftie.rb:17:in `<top (required)>'
/tmp/kitchen/cache/cookbooks/poise-archive/libraries/default.rb:19:in `<top (required)>'
Relevant File Content:
----------------------
/tmp/kitchen/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<Symbol>, Set<Symbol>] 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.2.29
platform=amazon
platform_version=2
ruby=ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
program_name=/opt/chef/bin/chef-client
executable=/opt/chef/bin/chef-client
same thing poise cookbooks ubandoned
:speaking_head: Foreword
Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.
:ghost: Brief Description
The poise cookbook has been deprecated for some time, with Chef 17 it no longer compiles.
:pancakes: Cookbook version
4.5.2
:woman_cook: Chef-Infra Version
17.1.35
:tophat: Platform details
RHEL 7
Steps To Reproduce
Steps to reproduce the behavior:
:police_car: Expected behavior
Chef should work
:heavy_plus_sign: Additional context
Add any other context about the problem here. e.g. related issues or existing pull requests.