Code Monkey home page Code Monkey logo

Comments (1)

haidangwa avatar haidangwa commented on June 12, 2024

@tas50 @jtimberman I do think this is more than an enhancement. It is causing anyone using chefspec to have a failed run. Reports have been made that demonstrate the failure of chefspec when a cookbook uses a chef definition instead (see zuazo/ssh_authorized_keys-cookbook#14, for example).

My organization has a wrapper around this chef-splunk cookbook and we're not able to move forward, because chefspec fails for us.

Here is the chefspec snippet that we get:

  1) twdc_chef_monitoring::splunk_nginx_monitors created splunk monitor
     Failure/Error:
       ChefSpec::ServerRunner.new do |node, server|
         create_data_bag_item(server, 'vault', 'splunk_kitchen')
         create_environments(server)
         node.chef_environment = 'kitchen'
       end.converge(described_recipe)
     
     NoMethodError:
       undefined method `params' for nil:NilClass
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/dsl/definitions.rb:31:in `evaluate_resource_definition'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/dsl/definitions.rb:14:in `splunk_installer'
     # /tmp/cookbooks/chef-splunk/recipes/install_forwarder.rb:20:in `from_file'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/mixin/from_file.rb:34:in `instance_eval'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/mixin/from_file.rb:34:in `from_file'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/cookbook_version.rb:199:in `load_recipe'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/run_context.rb:350:in `load_recipe'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/run_context.rb:306:in `block in include_recipe'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/run_context.rb:305:in `each'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/run_context.rb:305:in `include_recipe'
     # ./vendor/bundle/ruby/2.5.0/gems/chef-14.12.9/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'

IMHO, this is a bug on the basis that the master branch of this cookbook repo also fails with this error after sorting out the issue mentioned in #118 .

from chef-splunk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.