[chef] Issue with easy_install_package provider


Chronological Thread 
  • From: Grig Gheorghiu < >
  • To:
  • Subject: [chef] Issue with easy_install_package provider
  • Date: Mon, 22 Nov 2010 17:05:53 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=sFUfAxjMTM1Xqu8OQyRhmaMT6GBthlKiJQO1rytgTBX/93Ue+Hi8NktNMAuV/vbcip uO3ZTogf4k51/ynP17kekdz14liex+gr0sgcoW/Q4W/14NfOBNykl6IaCPq682A0Srnr kqo8X6MMhFcMHteS/diKcPWKmqJCAQCdSDy/s=

Hi,

First my scenario:

* chef server 0.9.4
* chef-client installed on remote node via gem install using rubygems-1.3.7.
* remote node running Ubuntu Lucid 64-bit.

I tried to use the easy_install_package provider to install some
Python packages. It works most of the time, but it fails for packages
whose main module name (in terms of doing 'import pkgname') is
different from the name of the package.

Case in point is dnspython. If you run 'easy_install dnspython', you
need to then do 'import dns' in your code, and not 'import dnspython'.
However, the provider tries to verify the existence of the package by
trying 'import dnspython' and it gets an exception which stops the
entire chef-client run.

Here is the entire traceback from chef.log:

ERROR: Running exception handlers
ERROR: Exception handlers complete
ERROR: Chef::Exceptions::ShellCommandFailed:Expected process to exit
0, but it exited with 1
---- Begin output of python -c "import dnspython; print dnspython.__path__" 
----
STDOUT:
STDERR: Traceback (most recent call last):
 File "<string>", line 1, in <module>
ImportError: No module named dnspython
---- End output of python -c "import dnspython; print dnspython.__path__" ----
Ran python -c "import dnspython; print dnspython.__path__" returned 1
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/shell_out.rb:232:in
`invalid!'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/shell_out.rb:218:in
`error!'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/shell_out.rb:33:in
`shell_out!'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/provider/package/easy_install.rb:69:in
`load_current_resource'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource.rb:394:in
`run_action'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:53:in
`run_action'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in
`converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in
`converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection.rb:94
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in
`call'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in
`call_iterator_block'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in
`step'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in
`iterate'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in
`each_with_index'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection.rb:92:in
`execute_each_resource'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:84:in
`converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/client.rb:268:in
`converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/client.rb:171:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application/client.rb:222:in
`run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application/client.rb:212:in
`loop'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application/client.rb:212:in
`run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application.rb:62:in
`run'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/chef-client:26
/usr/bin/chef-client:19:in `load'
/usr/bin/chef-client:19



Archive powered by MHonArc 2.6.16.

§