include_recipe failing


#1

Hi. I’m trying to include a java recipe inside of a hadoop recipe. I’ve
re-created the java cookbook to make sure the metadata, etc. is correct. I get
the following error & log output.

[root@node001]# chef-client -l debug
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:111:in []': Cannot find a cookbook named java; did you forget to add metadata to a cookbook? (http://wiki.opscode.com/display/chef/Metadata) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:78:ininclude_recipe’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:in
each' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:ininclude_recipe’
from /usr/local/chef/cache/cookbooks/hadoop/recipes/default.rb:20:in
from_file' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook.rb:139:inload_recipe’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:124:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:ineach’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:378:inconverge’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:82:in
run' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:186:inrun_application’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:in
loop' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:inrun_application’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application.rb:57:in run' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/bin/chef-client:26 from /usr/bin/chef-client:19:inload’
from /usr/bin/chef-client:19

[root@node001]# tail /var/log/chef/client.log
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Found recipe default in cookbook
hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe java via include_recipe


#2

Does the hadoop cookbook’s metadata say that it requires java?

Adam

On Tue, Aug 25, 2009 at 4:30 PM, m2matson@gmail.com wrote:

Hi. I’m trying to include a java recipe inside of a hadoop recipe. I’ve
re-created the java cookbook to make sure the metadata, etc. is correct. I get
the following error & log output.

[root@node001]# chef-client -l debug
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:111:in []': Cannot find a cookbook named java; did you forget to add metadata to a cookbook? (http://wiki.opscode.com/display/chef/Metadata) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:78:ininclude_recipe’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:in
each' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:ininclude_recipe’
from /usr/local/chef/cache/cookbooks/hadoop/recipes/default.rb:20:in
from_file' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook.rb:139:inload_recipe’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:124:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:ineach’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:378:inconverge’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:82:in
run' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:186:inrun_application’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:in
loop' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:inrun_application’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application.rb:57:in run' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/bin/chef-client:26 from /usr/bin/chef-client:19:inload’
from /usr/bin/chef-client:19

[root@node001]# tail /var/log/chef/client.log
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Found recipe default in cookbook
hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe java via include_recipe


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com


#3

A-ha! I had to manually add “depends ‘java’” to the hadoop cookbook
metadata.rb and run ‘rake install’. Is manually updating metadata required
for all cross-cookbook include_recipe’s?

That did the trick. Thanks Adam!

On Tue, Aug 25, 2009 at 4:33 PM, Adam Jacob adam@opscode.com wrote:

Does the hadoop cookbook’s metadata say that it requires java?

Adam

On Tue, Aug 25, 2009 at 4:30 PM, m2matson@gmail.com wrote:

Hi. I’m trying to include a java recipe inside of a hadoop recipe. I’ve
re-created the java cookbook to make sure the metadata, etc. is correct.
I get
the following error & log output.

[root@node001]# chef-client -l debug
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:111:in
[]': Cannot find a cookbook named java; did you forget to add metadata to a cookbook? (http://wiki.opscode.com/display/chef/Metadata) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:78:ininclude_recipe’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:in
each' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:ininclude_recipe’
from
/usr/local/chef/cache/cookbooks/hadoop/recipes/default.rb:20:in
from_file' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook.rb:139:inload_recipe’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:124:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:ineach’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:378:inconverge’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:82:in
`run’
from

/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:186:in

`run_application’
from

/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:in

`loop’
from

/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:in

run_application' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application.rb:57:inrun’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/bin/chef-client:26
from /usr/bin/chef-client:19:in `load’
from /usr/bin/chef-client:19

[root@node001]# tail /var/log/chef/client.log
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Found recipe default in cookbook
hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe java via
include_recipe


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com


Matt Matson
m2matson@gmail.com
415.254.2777

AIM: flagsout


#4

Yes, unless the recipe is included directly on the node’s run_list.

The reason we do this is so that we can only ship the cookbooks you
need to build a node to the edge, rather than shipping everything up
front.

Adam

On Tue, Aug 25, 2009 at 4:55 PM, Matt Matsonm2matson@gmail.com wrote:

A-ha! I had to manually add “depends ‘java’” to the hadoop cookbook
metadata.rb and run ‘rake install’. Is manually updating metadata required
for all cross-cookbook include_recipe’s?

That did the trick. Thanks Adam!

On Tue, Aug 25, 2009 at 4:33 PM, Adam Jacob adam@opscode.com wrote:

Does the hadoop cookbook’s metadata say that it requires java?

Adam

On Tue, Aug 25, 2009 at 4:30 PM, m2matson@gmail.com wrote:

Hi. I’m trying to include a java recipe inside of a hadoop recipe.
I’ve
re-created the java cookbook to make sure the metadata, etc. is correct.
I get
the following error & log output.

[root@node001]# chef-client -l debug

/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:111:in
[]': Cannot find a cookbook named java; did you forget to add metadata to a cookbook? (http://wiki.opscode.com/display/chef/Metadata) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:78:ininclude_recipe’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:in
each' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb:64:ininclude_recipe’
from
/usr/local/chef/cache/cookbooks/hadoop/recipes/default.rb:20:in
from_file' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook.rb:139:inload_recipe’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:124:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:ineach’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:110:in
load_recipes' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:378:inconverge’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/client.rb:82:in
`run’
from

/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:186:in
`run_application’
from

/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:in
`loop’
from

/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application/client.rb:178:in
run_application' from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application.rb:57:inrun’
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/bin/chef-client:26
from /usr/bin/chef-client:19:in `load’
from /usr/bin/chef-client:19

[root@node001]# tail /var/log/chef/client.log
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Found recipe default in
cookbook
hadoop
[Tue, 25 Aug 2009 22:44:21 +0000] DEBUG: Loading Recipe java via
include_recipe


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com


Matt Matson
m2matson@gmail.com
415.254.2777

AIM: flagsout


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com