Chef-solo not finding the users cookbook


#1

I must be doing something dumb but I am getting the following error
when I try to run chef solo

chef-solo -c config/solo.rb -j dna/solo.json

/usr/local/lib/ruby/gems/1.9.1/gems/systemu-2.2.0/lib/systemu.rb:29:
Use RbConfig instead of obsolete and deprecated Config.

[Sat, 31 Dec 2011 17:24:39 +1300] INFO: *** Chef 0.10.8 ***
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Setting the run_list to
[“role[base]”] from JSON
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Run List is [role[base]]
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Run List expands to [sudo,
apt, git, build-essential, recipe[users::sysadmins]
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Starting Chef Run for localhost
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Running start handlers
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Start handlers complete.
[Sat, 31 Dec 2011 17:24:39 +1300] ERROR: Running exception handlers
[Sat, 31 Dec 2011 17:24:39 +1300] ERROR: Exception handlers complete
[Sat, 31 Dec 2011 17:24:39 +1300] FATAL: Stacktrace dumped to
/media/sf_tim/source/digital_dialogue/dd-infrastructure/chef-stacktrace.out
[Sat, 31 Dec 2011 17:24:39 +1300] FATAL:
Chef::Exceptions::CookbookNotFound: Cookbook recipe[users not found.
If you’re loading recipe[users from another cookbook, make sure you
configure the dependency in your metadata

The cookbook is there in the cookbooks directory and is untouched. The
base role looks like this

name "base"
description “Base role applied to all nodes.”

run_list(
“recipe[sudo]”,
“recipe[apt]”,
“recipe[git]”,
“recipe[build-essential]” ,
“recipe[users::sysadmins”
)
override_attributes(
:authorization => {
:sudo => {
:users => [“ubuntu”],
:passwordless => true
}
}
)

the solo.json looks like this

{ “run_list”: [ “role[base]”] }

So what gives?


#2

I believe this has something to do with search paths for cookbooks and specifying something to that effect during the runtime of a chef-solo run.

Be handy to have a copy of the stack-trace?


Sahil R Cooner

On Friday, December 30, 2011 at 8:28 PM, Tim Uckun wrote:

I must be doing something dumb but I am getting the following error
when I try to run chef solo

chef-solo -c config/solo.rb -j dna/solo.json

/usr/local/lib/ruby/gems/1.9.1/gems/systemu-2.2.0/lib/systemu.rb:29:
Use RbConfig instead of obsolete and deprecated Config.

[Sat, 31 Dec 2011 17:24:39 +1300] INFO: *** Chef 0.10.8 ***
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Setting the run_list to
[“role[base]”] from JSON
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Run List is [role[base]]
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Run List expands to [sudo,
apt, git, build-essential, recipe[users::sysadmins]
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Starting Chef Run for localhost
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Running start handlers
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Start handlers complete.
[Sat, 31 Dec 2011 17:24:39 +1300] ERROR: Running exception handlers
[Sat, 31 Dec 2011 17:24:39 +1300] ERROR: Exception handlers complete
[Sat, 31 Dec 2011 17:24:39 +1300] FATAL: Stacktrace dumped to
/media/sf_tim/source/digital_dialogue/dd-infrastructure/chef-stacktrace.out
[Sat, 31 Dec 2011 17:24:39 +1300] FATAL:
Chef::Exceptions::CookbookNotFound: Cookbook recipe[users not found.
If you’re loading recipe[users from another cookbook, make sure you
configure the dependency in your metadata

The cookbook is there in the cookbooks directory and is untouched. The
base role looks like this

name "base"
description “Base role applied to all nodes.”

run_list(
“recipe[sudo]”,
“recipe[apt]”,
“recipe[git]”,
“recipe[build-essential]” ,
“recipe[users::sysadmins”
)
override_attributes(
:authorization => {
:sudo => {
:users => [“ubuntu”],
:passwordless => true
}
}
)

the solo.json looks like this

{ “run_list”: [ “role[base]”] }

So what gives?


#3

You have a typo

On 31 December 2011 17:28, Tim Uckun timuckun@gmail.com wrote:

I must be doing something dumb but I am getting the following error
when I try to run chef solo

chef-solo -c config/solo.rb -j dna/solo.json

/usr/local/lib/ruby/gems/1.9.1/gems/systemu-2.2.0/lib/systemu.rb:29:
Use RbConfig instead of obsolete and deprecated Config.

[Sat, 31 Dec 2011 17:24:39 +1300] INFO: *** Chef 0.10.8 ***
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Setting the run_list to
[“role[base]”] from JSON
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Run List is [role[base]]
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Run List expands to [sudo,
apt, git, build-essential, recipe[users::sysadmins]
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Starting Chef Run for localhost
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Running start handlers
[Sat, 31 Dec 2011 17:24:39 +1300] INFO: Start handlers complete.
[Sat, 31 Dec 2011 17:24:39 +1300] ERROR: Running exception handlers
[Sat, 31 Dec 2011 17:24:39 +1300] ERROR: Exception handlers complete
[Sat, 31 Dec 2011 17:24:39 +1300] FATAL: Stacktrace dumped to
/media/sf_tim/source/digital_dialogue/dd-infrastructure/chef-stacktrace.out
[Sat, 31 Dec 2011 17:24:39 +1300] FATAL:
Chef::Exceptions::CookbookNotFound: Cookbook recipe[users not found.
If you’re loading recipe[users from another cookbook, make sure you
configure the dependency in your metadata

See how it says recipe[users not found? I guess the exception could be
enhanced a little.

The cookbook is there in the cookbooks directory and is untouched. The
base role looks like this

name "base"
description “Base role applied to all nodes.”

run_list(
“recipe[sudo]”,
“recipe[apt]”,
“recipe[git]”,
“recipe[build-essential]” ,
“recipe[users::sysadmins”

You’ve missed the ending right-square brace, here.

Should be:

“recipe[users::sysadmins]”

Cheers,

AJ

)
override_attributes(
:authorization => {
:sudo => {
:users => [“ubuntu”],
:passwordless => true
}
}
)

the solo.json looks like this

{ “run_list”: [ “role[base]”] }

So what gives?


#4

You’ve missed the ending right-square brace, here.

Should be:

“recipe[users::sysadmins]”

Yea I caught that. How dumb. That’s what I get for working so late I guess.

There are a couple of other issues I am having with the opscode
cookbooks, I’ll post them here if I can’t figure out what is going on.

Thanks for taking the time to respond.


#5

On Sun, Jan 1, 2012 at 5:20 AM, Tim Uckun timuckun@gmail.com wrote:

“recipe[users::sysadmins]”

Yea I caught that. How dumb. That’s what I get for working so late I guess.

There are a couple of other issues I am having with the opscode
cookbooks, I’ll post them here if I can’t figure out what is going on.

Thanks for taking the time to respond.

One thing to note about this cookbook, it won’t work with chef-solo
without modification, as it uses search and data bag items, which are
chef server/client features.

You’ll probably encounter that with a number of our cookbooks. We try
to make sure that the README.md in each cookbook notes whether a chef
server is required, and for which feature (search, data bags, etc).


Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman


#6

You’ll probably encounter that with a number of our cookbooks. We try
to make sure that the README.md in each cookbook notes whether a chef
server is required, and for which feature (search, data bags, etc).

Yes I noticed that. The data bag functionality does not work with
solo. At this time I am trying to make things work with solo so I will
do without this functionality for now. Since I can just create an
array of hashes in the attributes and iterate though them I don’t see
the loss of databags as a big deal for now.