You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run include both python (the "standard" one; there might be others, but this is the only one I know of) and this cookbook, what happens is that python tries to upgrade setuptools (it appears because the version of setuptools installed by anaconda differs/is less than the latest). This will cause the chef-run to fail with an error, something like:
Recipe: python::pip [3947/8999]
* cookbook_file[/var/chef/cache/get-pip.py] action create (skipped due to not_if)
* execute[install-pip] action run (skipped due to not_if)
* python_pip[setuptools] action upgrade
================================================================================
Error executing action `upgrade` on resource 'python_pip[setuptools]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of pip install --upgrade setuptools ----
STDOUT: Downloading/unpacking setuptools from https://pypi.python.org/packages/3.4/s/setuptools/setuptools-5.7-py2.py3-none-any.whl#md5=94eedce8d9b793d4affa4a85cd45edfa
Installing collected packages: setuptools
Found existing installation: setuptools 3.6
Cleaning up...
Cannot remove entries from nonexistent file /opt/anaconda/2.0.1/lib/python2.7/site-packages/easy-install.pth
Storing debug log for failure in /home/ubuntu/.pip/pip.log
STDERR:
---- End output of pip install --upgrade setuptools ----
Ran pip install --upgrade setuptools returned 1
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/python/providers/pip.rb:158:in `pip_cmd'
/var/chef/cache/cookbooks/python/providers/pip.rb:139:in `install_package'
/var/chef/cache/cookbooks/python/providers/pip.rb:144:in `upgrade_package'
/var/chef/cache/cookbooks/python/providers/pip.rb:60:in `block (2 levels) in class_from_file'
/var/chef/cache/cookbooks/python/providers/pip.rb:58:in `block in class_from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/python/recipes/pip.rb
50: python_pip 'setuptools' do
51: action :upgrade
52: version node['python']['setuptools_version']
53: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/python/recipes/pip.rb:50:in `from_file'
python_pip("setuptools") do
action [:upgrade]
retries 0
retry_delay 2
cookbook_name "python"
recipe_name "pip"
package_name "setuptools"
options " --upgrade"
timeout 900
end
[2014-09-07T20:31:57+00:00] ERROR: Running exception handlers
[2014-09-07T20:31:57+00:00] ERROR: Exception handlers complete
[2014-09-07T20:31:57+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 4 resources updated
[2014-09-07T20:31:57+00:00] ERROR: python_pip[setuptools] (python::pip line 50) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but rec
eived '1'
---- Begin output of pip install --upgrade setuptools ----
STDOUT: Downloading/unpacking setuptools from https://pypi.python.org/packages/3.4/s/setuptools/setuptools-5.7-py2.py3-none-any.whl#md5=94eedce8d9b793d4affa4a85cd45edfa
Installing collected packages: setuptools
Found existing installation: setuptools 3.6
Cleaning up...
Cannot remove entries from nonexistent file /opt/anaconda/2.0.1/lib/python2.7/site-packages/easy-install.pth
Storing debug log for failure in /home/ubuntu/.pip/pip.log
STDERR:
---- End output of pip install --upgrade setuptools ----
Ran pip install --upgrade setuptools returned 1
For now, the best workaround is to use chef-rewind to remove that resource, but this requires the user to know to include the workaround recipe (and can break other stuff). Clearly a hack.
This is just a hypothesis; comments, feedback, logs, new/better ideas, etc are appreciated!
The text was updated successfully, but these errors were encountered:
If you run include both python (the "standard" one; there might be others, but this is the only one I know of) and this cookbook, what happens is that
python
tries to upgrade setuptools (it appears because the version of setuptools installed by anaconda differs/is less than the latest). This will cause the chef-run to fail with an error, something like:For now, the best workaround is to use
chef-rewind
to remove that resource, but this requires the user to know to include the workaround recipe (and can break other stuff). Clearly a hack.This is just a hypothesis; comments, feedback, logs, new/better ideas, etc are appreciated!
The text was updated successfully, but these errors were encountered: