poise / python

THIS COOKBOOK IS DEPRECATED – Chef cookbook to install Python and related tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cookbook cannot find get-pip.py when installing on a VM

dhirajt opened this issue · comments

Hi,
I am a chef newbie so i don't know if i am installing this cookbook the right way but i get a

Error executing action `create` on resource 'cookbook_file[/var/chef/cache/get-pip.py]'

when i try to install this cookbook. I have checked by SSHing into the VM that the file get-pip.py is there.
I am using vagrant with virtualbox to manage my VM and berkshelf to manage my cookbook dependencies.

My Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.box = "trusty64"
  config.vm.box_url = "file://trusty-server-cloudimg-amd64-vagrant-disk1.box"

  config.omnibus.chef_version = :latest

  config.vm.network "forwarded_port", guest: 80, host: 8001
  config.vm.network "private_network", ip: "192.168.33.10"

  config.vm.synced_folder ".", "/home/vagrant/project"

  config.vm.provider "virtualbox" do |vb|
     vb.memory = "1024"
  end

  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" 

  config.vm.provision :chef_solo do |chef|
        chef.cookbooks_path = "~/.berkshelf/cookbooks"

        chef.add_recipe "apt"
        chef.add_recipe "build-essential"
        chef.add_recipe "git"
        chef.add_recipe "python"
   end
end

My Berksfile

source "https://supermarket.chef.io"

cookbook 'apt', '~> 2.6.1'
cookbook 'build-essential', '~> 2.1.3'
cookbook 'git', '~> 4.1.0'
cookbook 'python', '~> 1.4.6'

The traceback when chef tries to install this cookbook:

==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
   Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: [2015-03-05T07:09:46+00:00] INFO: Forking chef instance to converge...
==> default: [2015-03-05T07:09:46+00:00] INFO: *** Chef 12.1.0 ***
==> default: [2015-03-05T07:09:46+00:00] INFO: Chef-client pid: 2518
==> default: [2015-03-05T07:09:52+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[build-essential]", "recipe[git]", "recipe[python]"] from CLI options
==> default: [2015-03-05T07:09:52+00:00] INFO: Run List is [recipe[apt], recipe[build-essential], recipe[git], recipe[python]]
==> default: [2015-03-05T07:09:52+00:00] INFO: Run List expands to [apt, build-essential, git, python]
==> default: [2015-03-05T07:09:52+00:00] INFO: Starting Chef Run for vagrant-ubuntu-trusty-64
==> default: [2015-03-05T07:09:52+00:00] INFO: Running start handlers
==> default: [2015-03-05T07:09:52+00:00] INFO: Start handlers complete.
==> default: [2015-03-05T07:10:16+00:00] INFO: execute[apt-get-update-periodic] ran successfully
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local] created directory /var/cache/local
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local] owner changed to 0
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local] group changed to 0
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local] mode changed to 755
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local/preseeding] created directory /var/cache/local/preseeding
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local/preseeding] owner changed to 0
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local/preseeding] group changed to 0
==> default: [2015-03-05T07:10:16+00:00] INFO: directory[/var/cache/local/preseeding] mode changed to 755
==> default: [2015-03-05T07:10:29+00:00] INFO: apt_package[autoconf] installed autoconf at 2.69-6
==> default: [2015-03-05T07:10:37+00:00] INFO: apt_package[binutils-doc] installed binutils-doc at 2.24-5ubuntu3.1
==> default: [2015-03-05T07:10:44+00:00] INFO: apt_package[bison] installed bison at 2:3.0.2.dfsg-2
==> default: [2015-03-05T07:11:02+00:00] INFO: apt_package[build-essential] installed build-essential at 11.6ubuntu6
==> default: [2015-03-05T07:11:21+00:00] INFO: apt_package[flex] installed flex at 2.5.35-10.1ubuntu2
==> default: [2015-03-05T07:11:39+00:00] INFO: apt_package[gettext] installed gettext at 0.18.3.1-1ubuntu3
==> default: [2015-03-05T07:11:39+00:00] INFO: apt_package[ncurses-dev] is a virtual package, actually acting on package[libncurses5-dev]
==> default: [2015-03-05T07:11:48+00:00] INFO: apt_package[ncurses-dev] installed ncurses-dev at (none)
==> default: [2015-03-05T07:12:00+00:00] INFO: apt_package[git] installed git at 1:1.9.1-1ubuntu0.1
==> default: [2015-03-05T07:12:19+00:00] INFO: apt_package[python-dev] installed python-dev at 2.7.5-5ubuntu3
==> default: 
==> default: ================================================================================
==> default: Error executing action `create` on resource 'cookbook_file[/var/chef/cache/get-pip.py]'
==> default: ================================================================================
==> default: 
==> default: 
==> default: RuntimeError
==> default: ------------
==> default: File files/default/get-pip.py does not exist for cookbook python
==> default: 
==> default: 
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef/ac41a887bfa2c857cfe2917e95756f8c/cookbooks/python-1.4.6/recipes/pip.rb
==> default: 
==> default: 
==> default: 
==> default:  36: cookbook_file "#{Chef::Config[:file_cache_path]}/get-pip.py" do
==> default: 
==> default:  37:   source 'get-pip.py'
==> default: 
==> default:  38:   mode "0644"
==> default: 
==> default:  39:   not_if { ::File.exists?(pip_binary) }
==> default: 
==> default:  40: end
==> default: 
==> default:  41: 
==> default: 
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef/ac41a887bfa2c857cfe2917e95756f8c/cookbooks/python-1.4.6/recipes/pip.rb:36:in `from_file'
==> default: 
==> default: cookbook_file("/var/chef/cache/get-pip.py") do
==> default:   provider Chef::Provider::CookbookFile
==> default:   action "create"
==> default:   retries 0
==> default:   retry_delay 2
==> default:   default_guard_interpreter :default
==> default:   path "/var/chef/cache/get-pip.py"
==> default:   backup 5
==> default:   atomic_update true
==> default:   source "get-pip.py"
==> default:   declared_type :cookbook_file
==> default:   cookbook_name :python
==> default:   recipe_name "pip"
==> default:   mode "0644"
==> default:   not_if { #code block }
==> default: end
==> default: 
==> default: [2015-03-05T07:12:19+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2015-03-05T07:12:19+00:00] ERROR: Converge failed with error message cookbook_file[/var/chef/cache/get-pip.py] (python::pip line 36) had an error: RuntimeError: File files/default/get-pip.py does not exist for cookbook python
==> default: [2015-03-05T07:12:19+00:00] ERROR: Running exception handlers
==> default: [2015-03-05T07:12:19+00:00] ERROR: Exception handlers complete
==> default: [2015-03-05T07:12:19+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-03-05T07:12:19+00:00] ERROR: Found 1 errors, they are stored in the backtrace
==> default: [2015-03-05T07:12:19+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Closing this out as https://github.com/poise/poise-python no longer bundles get-pip.py.