How to debug errors


#1

I’m only learning chef now and find it hard to develop and debug my recipe
errors.
All I can see are verbose stack traces but it’s usually quite hard to dig
the real error from the traces. The example below does not, as far as I can
tell hint any specific error in my code (and there are obviously errors…)
so I’m left with g-old trial and error.
I was wondering what’s the best approach to advance faster while leaning
developing. I’ve made myself familiar with chef’s basics and ran a few
tutorials but when writing my own first recipe I’m having hard time
bootstrapping.

The error below indicates some sort of bash error in a recipe although I’m
not sure exactly what. I suppose the following code uses the wrong syntax
but the real question isn’t about the syntax it’s about finding an effective
way to write-compile-test.

17 bash “install_app” do
18 user "root"
19 code <<-EOH
20 mkdir -p #{node[:wars]}
21 cp #{node[:war_src]} #{node[:war_dest]}
22 EOH
23 end

[root@centos imageserver]# chef-solo -c ~/solo.rb -j ~/node.json
[Mon, 13 Sep 2010 11:52:06 +0200] INFO: Setting the run_list to
[“recipe[imageserver]”] from JSON
[Mon, 13 Sep 2010 11:52:06 +0200] INFO: Starting Chef Run (Version 0.9.8)
[Mon, 13 Sep 2010 11:52:06 +0200] ERROR: bash[install_app]
(/tmp/chef-solo/cookbooks/imageserver/recipes/default.rb:17:in from_file') had an error: "bash" "/tmp/chef-script.17504.0" returned 1, expected 0 /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:inhandle_command_failures’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in
run_command' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/execute.rb:49:inaction_run’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in
action_run' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:insend’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in
run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:109:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in
each' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:94:in
execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:incall’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in
call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:instep’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:104:in
iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:ineach_with_index’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:92:in
execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:82:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/client.rb:304:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/client.rb:87:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:191:in
run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application/solo.rb:181:inloop’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in
run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application.rb:62:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25
/usr/bin/chef-solo:19:in load' /usr/bin/chef-solo:19 [Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Running exception handlers [Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Exception handlers complete [Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Re-raising exception: Chef::Exceptions::Exec - "bash" "/tmp/chef-script.17504.0" returned 1, expected 0 /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:inhandle_command_failures’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in
run_command' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/execute.rb:49:inaction_run’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in
action_run' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:insend’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in
run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:109:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in
each' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:94:in
execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:incall’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in
call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:instep’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:104:in
iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:ineach_with_index’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:92:in
execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:82:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/client.rb:304:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/client.rb:87:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:191:in
run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application/solo.rb:181:inloop’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in
run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application.rb:62:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25
/usr/bin/chef-solo:19:in load' /usr/bin/chef-solo:19 /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:inhandle_command_failures’: “bash” “/tmp/chef-script.17504.0” returned 1,
expected 0 (Chef::Exceptions::Exec)
from
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in
run_command' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/execute.rb:49:inaction_run’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in
action_run' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:insend’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in
run_action' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:109:inconverge’
from
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in
each' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:inconverge’
… 13 levels…
from
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application.rb:62:in
run' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25 from /usr/bin/chef-solo:19:inload’
from /usr/bin/chef-solo:19

thanks

/Ran


#2

On 13 Sep 2010, at 11:19, Ran Tavory wrote:

I’m only learning chef now and find it hard to develop and debug my recipe errors.
All I can see are verbose stack traces but it’s usually quite hard to dig the real error from the traces. The example below does not, as far as I can tell hint any specific error in my code (and there are obviously errors…) so I’m left with g-old trial and error.
I was wondering what’s the best approach to advance faster while leaning developing. I’ve made myself familiar with chef’s basics and ran a few tutorials but when writing my own first recipe I’m having hard time bootstrapping.

The error below indicates some sort of bash error in a recipe although I’m not sure exactly what. I suppose the following code uses the wrong syntax but the real question isn’t about the syntax it’s about finding an effective way to write-compile-test.

17 bash “install_app” do
18 user "root"
19 code <<-EOH
20 mkdir -p #{node[:wars]}
21 cp #{node[:war_src]} #{node[:war_dest]}
22 EOH
23 end

Run with chef debug logging enable to see the full command output/error:

chef-solo -l debug ....

Also using bash to make a directory and the copy a file isn’t what I’d consider the ‘chef’ way of doing things.

directory node[:wars] do
recursive true
mode '0755’
end

etc.

-ash

[root@centos imageserver]# chef-solo -c ~/solo.rb -j ~/node.json
[Mon, 13 Sep 2010 11:52:06 +0200] INFO: Setting the run_list to [“recipe[imageserver]”] from JSON
[Mon, 13 Sep 2010 11:52:06 +0200] INFO: Starting Chef Run (Version 0.9.8)
[Mon, 13 Sep 2010 11:52:06 +0200] ERROR: bash[install_app] (/tmp/chef-solo/cookbooks/imageserver/recipes/default.rb:17:in from_file') had an error: "bash" "/tmp/chef-script.17504.0" returned 1, expected 0 /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:inhandle_command_failures’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in run_command' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/execute.rb:49:inaction_run’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in action_run' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:insend’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:109:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in each' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:94:in execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:incall’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:instep’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:104:in iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:ineach_with_index’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:92:in execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:82:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/client.rb:304:in converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/client.rb:87:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:191:in run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application/solo.rb:181:inloop’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application.rb:62:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25
/usr/bin/chef-solo:19:in load' /usr/bin/chef-solo:19 [Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Running exception handlers [Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Exception handlers complete [Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Re-raising exception: Chef::Exceptions::Exec - "bash" "/tmp/chef-script.17504.0" returned 1, expected 0 /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:inhandle_command_failures’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in run_command' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/execute.rb:49:inaction_run’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in action_run' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:insend’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in run_action' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:109:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in each' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:94:in execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:incall’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in call_iterator_block' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:instep’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:104:in iterate' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:ineach_with_index’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:92:in execute_each_resource' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:82:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/client.rb:304:in converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/client.rb:87:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:191:in run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application/solo.rb:181:inloop’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in run_application' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/application.rb:62:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25
/usr/bin/chef-solo:19:in load' /usr/bin/chef-solo:19 /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:inhandle_command_failures’: “bash” “/tmp/chef-script.17504.0” returned 1, expected 0 (Chef::Exceptions::Exec)
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in run_command' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/execute.rb:49:inaction_run’
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in action_run' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:insend’
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in run_action' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:109:inconverge’
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in each' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:inconverge’
… 13 levels…
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application.rb:62:in run' from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25 from /usr/bin/chef-solo:19:inload’
from /usr/bin/chef-solo:19

thanks


#3

as I mentioned, I’m learning it… now I know about the directory… thanks!

BTW, I haven’t found a list of all available “commands” or not sure how
should I call them, such as cookbook_file, bash, directory etc. Could
someone pls share a link?

On Mon, Sep 13, 2010 at 1:25 PM, Ash Berlin ash_opscode@firemirror.comwrote:

On 13 Sep 2010, at 11:19, Ran Tavory wrote:

I’m only learning chef now and find it hard to develop and debug my
recipe errors.
All I can see are verbose stack traces but it’s usually quite hard to dig
the real error from the traces. The example below does not, as far as I can
tell hint any specific error in my code (and there are obviously errors…)
so I’m left with g-old trial and error.
I was wondering what’s the best approach to advance faster while leaning
developing. I’ve made myself familiar with chef’s basics and ran a few
tutorials but when writing my own first recipe I’m having hard time
bootstrapping.

The error below indicates some sort of bash error in a recipe although
I’m not sure exactly what. I suppose the following code uses the wrong
syntax but the real question isn’t about the syntax it’s about finding an
effective way to write-compile-test.

17 bash “install_app” do
18 user "root"
19 code <<-EOH
20 mkdir -p #{node[:wars]}
21 cp #{node[:war_src]} #{node[:war_dest]}
22 EOH
23 end

Run with chef debug logging enable to see the full command output/error:

chef-solo -l debug …

Also using bash to make a directory and the copy a file isn’t what I’d
consider the ‘chef’ way of doing things.

directory node[:wars] do
recursive true
mode '0755’
end

etc.

-ash

[root@centos imageserver]# chef-solo -c ~/solo.rb -j ~/node.json
[Mon, 13 Sep 2010 11:52:06 +0200] INFO: Setting the run_list to
[“recipe[imageserver]”] from JSON
[Mon, 13 Sep 2010 11:52:06 +0200] INFO: Starting Chef Run (Version 0.9.8)
[Mon, 13 Sep 2010 11:52:06 +0200] ERROR: bash[install_app]
(/tmp/chef-solo/cookbooks/imageserver/recipes/default.rb:17:in `from_file’)
had an error:
“bash” “/tmp/chef-script.17504.0” returned 1, expected 0

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:184:in
`handle_command_failures’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in
`run_command’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/execute.rb:49:in
`action_run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in
`action_run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in
send' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:inrun_action’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:109:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:ineach’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in
`converge’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:94:in
`execute_each_resource’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in
`call’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in
`call_iterator_block’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:85:in
`step’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:104:in
`iterate’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:55:in
`each_with_index’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:92:in
`execute_each_resource’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:82:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/client.rb:304:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/client.rb:87:in
`run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:191:in
`run_application’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in
`loop’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in
`run_application’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application.rb:62:in
`run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25
/usr/bin/chef-solo:19:in `load’
/usr/bin/chef-solo:19
[Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Running exception handlers
[Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Exception handlers complete
[Mon, 13 Sep 2010 11:52:06 +0200] ERROR: Re-raising exception:
Chef::Exceptions::Exec - “bash” “/tmp/chef-script.17504.0” returned 1,
expected 0

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:184:in
`handle_command_failures’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in
`run_command’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/execute.rb:49:in
`action_run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in
`action_run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in
send' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:inrun_action’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:109:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:ineach’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in
`converge’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:94:in
`execute_each_resource’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in
`call’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:116:in
`call_iterator_block’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:85:in
`step’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:104:in
`iterate’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection/stepable_iterator.rb:55:in
`each_with_index’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/resource_collection.rb:92:in
`execute_each_resource’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:82:in
converge' /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/client.rb:304:inconverge’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/client.rb:87:in
`run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:191:in
`run_application’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in
`loop’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application/solo.rb:181:in
`run_application’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application.rb:62:in
`run’

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25
/usr/bin/chef-solo:19:in `load’
/usr/bin/chef-solo:19

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:184:in
`handle_command_failures’: “bash” “/tmp/chef-script.17504.0” returned 1,
expected 0 (Chef::Exceptions::Exec)

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/mixin/command.rb:131:in
`run_command’

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/execute.rb:49:in
`action_run’

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/provider/script.rb:33:in
`action_run’

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in
`send’

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:51:in
`run_action’

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:109:in
`converge’

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in
`each’

    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/runner.rb:108:in
`converge’

     ... 13 levels...
    from

/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/…/lib/chef/application.rb:62:in
`run’

    from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/chef-solo:25
    from /usr/bin/chef-solo:19:in `load'
    from /usr/bin/chef-solo:19

thanks


/Ran


#4

On 13 Sep 2010, at 11:28, Ran Tavory wrote:

as I mentioned, I’m learning it… now I know about the directory… thanks!

BTW, I haven’t found a list of all available “commands” or not sure how should I call them, such as cookbook_file, bash, directory etc. Could someone pls share a link?

wiki.opscode.com/display/chef/Resources is what I use.


#5

Shef is also a really good tool for debugging interactively instead of
just getting debug messages at runtime.

Sent from my iPad

On Sep 13, 2010, at 3:29 AM, Ash Berlin ash_opscode@firemirror.com wrote:

On 13 Sep 2010, at 11:28, Ran Tavory wrote:

as I mentioned, I’m learning it… now I know about the directory… thanks!

BTW, I haven’t found a list of all available “commands” or not sure how should I call them, such as cookbook_file, bash, directory etc. Could someone pls share a link?

wiki.opscode.com/display/chef/Resources is what I use.


#6

Are you deploying a war file to Tomcat or an application server? If you’re
using Tomcat, you may want to try using the Tomcat Manager API wrapper. I’ve
successfully implemented it an it makes deploying war files very elegant.

–Charlie

On Mon, Sep 13, 2010 at 5:37 AM, Sahil Cooner sahil.cooner@gmail.comwrote:

Shef is also a really good tool for debugging interactively instead of
just getting debug messages at runtime.

Sent from my iPad

On Sep 13, 2010, at 3:29 AM, Ash Berlin ash_opscode@firemirror.com
wrote:

On 13 Sep 2010, at 11:28, Ran Tavory wrote:

as I mentioned, I’m learning it… now I know about the directory…
thanks!

BTW, I haven’t found a list of all available “commands” or not sure how
should I call them, such as cookbook_file, bash, directory etc. Could
someone pls share a link?

wiki.opscode.com/display/chef/Resources is what I use.


Charles Sullivan
charlie.sullivan@gmail.com


#7

I’m deploying wars, yes.
Currently I;m only playing but eventually I’ll want to deploy wars and for
offline java processes some independent jars as well.
I was thinking of RPM-ing the wars and installing them with the pkg or some
other command but I haven’t decided yet, still learning.

The tomcat manager API is nice but is a no-go for me. The applications I’m
deploying are too crappy to withstand a hot-deploy so I need to take tomcat
down, copy wars and restart.

On Mon, Sep 13, 2010 at 4:59 PM, Charles Sullivan <
charlie.sullivan@gmail.com> wrote:

Are you deploying a war file to Tomcat or an application server? If you’re
using Tomcat, you may want to try using the Tomcat Manager API wrapper. I’ve
successfully implemented it an it makes deploying war files very elegant.

–Charlie

On Mon, Sep 13, 2010 at 5:37 AM, Sahil Cooner sahil.cooner@gmail.comwrote:

Shef is also a really good tool for debugging interactively instead of
just getting debug messages at runtime.

Sent from my iPad

On Sep 13, 2010, at 3:29 AM, Ash Berlin ash_opscode@firemirror.com
wrote:

On 13 Sep 2010, at 11:28, Ran Tavory wrote:

as I mentioned, I’m learning it… now I know about the directory…
thanks!

BTW, I haven’t found a list of all available “commands” or not sure how
should I call them, such as cookbook_file, bash, directory etc. Could
someone pls share a link?

wiki.opscode.com/display/chef/Resources is what I use.


Charles Sullivan
charlie.sullivan@gmail.com


/Ran