Knife error

Hi,

In an automated python script under runit supervision, I am getting
this error and I have no idea what it means. The only knife command I
am using via a os.system call is knife client delete mynode --yes

Any ideas? running the command manually from the command line works.

/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:51:in
join': can't convert nil into String (TypeError) from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:51:insite_subcommands’
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:74:in
subcommand_files' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:37:inload_commands’
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:112:in
load_commands' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:160:inrun’
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/application/knife.rb:128:in
run' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/knife:25 from /usr/bin/knife:19:inload’
from /usr/bin/knife:19
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:51:in
join': can't convert nil into String (TypeError) from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:51:insite_subcommands’
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:74:in
subcommand_files' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:37:inload_commands’
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:112:in
load_commands' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:160:inrun’
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/application/knife.rb:128:in
run' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/knife:25 from /usr/bin/knife:19:inload’
from /usr/bin/knife:19

On Mon, Jun 18, 2012 at 6:33 PM, David Montgomery
davidmontgomery@gmail.com wrote:

Hi,

In an automated python script under runit supervision, I am getting
this error and I have no idea what it means. The only knife command I
am using via a os.system call is knife client delete mynode --yes

Any ideas? running the command manually from the command line works.

/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:51:in
`join': can't convert nil into String (TypeError)
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife/core/subcommand_loader.rb:51:in

Offending line in subcommand_loader.rb:51:
user_specific_files.concat Dir.glob(File.join(env['HOME'], '.chef',
'plugins', 'knife', '*.rb'))

I suspect env['HOME'] is nil. Set HOME=/some/existing/directory and try again.

--
Motiejus Jakštys