Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Chef 14 Support #98

Open
petracvv opened this issue Nov 5, 2018 · 3 comments
Open

Chef 14 Support #98

petracvv opened this issue Nov 5, 2018 · 3 comments

Comments

@petracvv
Copy link

petracvv commented Nov 5, 2018

I am preparing for migrating to Chef 14 and am running into issues running this cookbook with that Chef client version. In particular, I am getting this traceback when the recipe compiles:

 NameError
         ---------
         instance variable @cwd not defined

         Cookbook Trace:
         ---------------
           /tmp/kitchen/cache/cookbooks/application_ruby/files/halite_gem/poise_application_ruby/resources/ruby_execute.rb:43:in `remove_instance_variable'
           /tmp/kitchen/cache/cookbooks/application_ruby/files/halite_gem/poise_application_ruby/resources/ruby_execute.rb:43:in `initialize'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/subresources/container.rb:140:in `block in declare_resource'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/subresources/container.rb:121:in `declare_resource'
           /tmp/kitchen/cache/cookbooks/application/files/halite_gem/poise_application/resources/application.rb:175:in `public_send'
           /tmp/kitchen/cache/cookbooks/application/files/halite_gem/poise_application/resources/application.rb:175:in `block (2 levels) in _rewire_dsl!'
           /tmp/kitchen/cache/cookbooks/my-redmine/recipes/default.rb:95:in `block in from_file'
           /tmp/kitchen/cache/cookbooks/my-redmine/recipes/default.rb:57:in `from_file'

         Relevant File Content:
         ----------------------
         /tmp/kitchen/cache/cookbooks/application_ruby/files/halite_gem/poise_application_ruby/resources/ruby_execute.rb:

          36:        class Resource < PoiseRuby::Resources::RubyExecute::Resource
          37:          include PoiseApplicationRuby::AppMixin
          38:          provides(:application_ruby_execute)
          39:
          40:          def initialize(*args)
          41:            super
          42:            # Clear some instance variables so my defaults work.
          43>>           remove_instance_variable(:@cwd)
          44:            remove_instance_variable(:@group)
          45:            remove_instance_variable(:@user)
          46:          end
          47:
          48:          # #!attribute cwd
          49:          #   Override the default directory to be the app path if unspecified.
          50:          #   @return [String]
          51:          attribute(:cwd, kind_of: [String, NilClass, FalseClass], default: lazy { parent && parent.path })
          52:

         System Info:
         ------------
         chef_version=14.6.47
         platform=centos
         platform_version=7.5.1804
         ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
         program_name=/opt/chef/bin/chef-client
         executable=/opt/chef/bin/chef-client

Is Chef 14 support in the works already for the poise application family of cookbooks?

@em77
Copy link

em77 commented Mar 14, 2019

@petracvv Did you find a workaround for this?

@petracvv
Copy link
Author

@em77 Not really. Based on discussions I've seen on the Chef Slack channel the poise maintainer doesn't have the time, support, etc to properly support the poise set of cookbooks. We've been looking at moving away from poise altogether.

@coderanger
Copy link
Member

What @petracvv said.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants