[chef] Re:


Chronological Thread 
  • From: Indra k < >
  • To: " " < >
  • Cc: " " < >
  • Subject: [chef] Re:
  • Date: Sat, 11 Oct 2014 17:53:52 +0800


Hi,
    As you told ,I  added that module but  it shows like this:
>
> ERROR: Exception handlers complete
> [2014-09-26T10:45:35+01:00] FATAL: Stacktrace dumped to /var/chef-solo/cache/chef-stacktrace.out
> [2014-09-26T10:45:35+01:00] FATAL: NoMethodError: undefined method `helpers' for Chef::Resource::Template
 
This is my chef-stacktraceout:

     Generated at 2014-09-30 07:07:23 +0200
NoMethodError: undefined method `helpers' for Chef::Resource::Template
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource.rb:282:in `method_missing'
/var/chef-solo/cookbooks/mongodb/definitions/mongodb.rb:147:in `block (2 levels) in from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:71:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:71:in `method_missing'
/var/chef-solo/cookbooks/mongodb/definitions/mongodb.rb:139:in `block in from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:48:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:48:in `method_missing'
/var/chef-solo/cookbooks/mongodb/recipes/default.rb:39:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/cookbook_version.rb:346:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:151:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:139:in `block in compile_recipes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:137:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:137:in `compile_recipes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:74:in `compile'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:86:in `load'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:224:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:467:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:200:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:190:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:239:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:73:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `<main>'


 
 Thanks,
 indra


From: Indra k < >
To: " " < >
Cc: " " < >
Sent: Friday, 10 October 2014 12:17 PM
Subject: Re: [chef]


Hi,

        But  by default itself they define that :

mongodb.conf.erb

#
# Automatically Generated by Chef, do not edit directly!
#

<%= to_boost_program_options @config %>

in attribute folder :



in recipe, here it defines,:

template node['mongodb']['dbconfig_file'] do
  cookbook node['mongodb']['template_cookbook']
  source node['mongodb']['dbconfig_file_template']
  group node['mongodb']['root_group']
  owner 'root'
  mode 0644
  variables(
    :config => node['mongodb']['config']
  )
  #helpers MongoDBConfigHelpers
  action :create_if_missing
end

FROM THAT @CONFIG IS A VARIABLE NOT TO_BOOST_PROGRAM_OPTIONS.but what it defines ?

Thanks

From: " " < >
To: Indra k < >
Cc:
Sent: Friday, 10 October 2014 11:19 AM
Subject: Re: [chef]

to_boost_program_options is a variable? Else it should be outside of the <%= %>


Vänliga hälsningar / Best regards, Jens Skott DevOps Engineer, Gears of Leo  +46 767 726396


Hi,

       when  installing  mongodb in chef-solo, it  shows:

Generated at 2014-10-10 07:20:58 +0200
Chef::Mixin::Template::TemplateError:

Chef::Mixin::Template::TemplateError (undefined method `to_boost_program_options' for #<Erubis::Context:0x00000001ea2cd8>) on line #5:

  3: #
  4:
  5: <%= to_boost_program_options @config %>

  (erubis):5:in `block in evaluate'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `instance_eval'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `evaluate'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/template.rb:81:in `render_template'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/provider/template.rb:115:in `render_with_context'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/provider/template.rb:52:in `action_create'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/provider/file.rb:252:in `action_create_if_missing'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/provider.rb:114:in `run_action'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource.rb:606:in `run_action'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/runner.rb:50:in `run_action'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/runner.rb:82:in `block (2 levels) in converge'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/runner.rb:82:in `each'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/runner.rb:82:in `block in converge'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource_collection.rb:94:in `block in execute_each_resource'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
                                                                                        1,1           Top



Any idea guys,

Thanks,
indra









Archive powered by MHonArc 2.6.16.

§