Skip to content

Instantly share code, notes, and snippets.

@gmanfunky
Forked from lvnilesh/msql-cookbook-fails
Created February 3, 2013 04:08
Show Gist options
  • Save gmanfunky/4700516 to your computer and use it in GitHub Desktop.
Save gmanfunky/4700516 to your computer and use it in GitHub Desktop.
I created a folder for vagrant, edited Vagrantfile, created a cookbooks folder and
git clone https://github.com/opscode-cookbooks/mysql.git
git clone https://github.com/opscode-cookbooks/build-essential.git
git clone https://github.com/opscode-cookbooks/openssl.git
and then vagrant up but chef failed.
[2012-11-08T14:52:50+00:00] INFO: *** Chef 10.14.2 ***
[2012-11-08T14:52:50+00:00] INFO: Setting the run_list to ["recipe[build-essential]", "recipe[openssl]", "recipe[mysql]", "recipe[mysql::client]", "recipe[mysql::server]"] from JSON
[2012-11-08T14:52:50+00:00] INFO: Run List is [recipe[build-essential], recipe[openssl], recipe[mysql], recipe[mysql::client], recipe[mysql::server]]
[2012-11-08T14:52:50+00:00] INFO: Run List expands to [build-essential, openssl, mysql, mysql::client, mysql::server]
[2012-11-08T14:52:50+00:00] INFO: Starting Chef Run for precise64
[2012-11-08T14:52:50+00:00] INFO: Running start handlers
[2012-11-08T14:52:50+00:00] INFO: Start handlers complete.
[2012-11-08T14:52:50+00:00] INFO: Could not find previously defined grants.sql resource
[2012-11-08T14:52:50+00:00] INFO: Processing package[build-essential] action install (build-essential::default line 51)
[2012-11-08T14:52:59+00:00] INFO: Processing package[binutils-doc] action install (build-essential::default line 51)
[2012-11-08T14:53:01+00:00] INFO: Processing package[autoconf] action install (build-essential::default line 58)
[2012-11-08T14:53:04+00:00] INFO: Processing package[flex] action install (build-essential::default line 58)
[2012-11-08T14:53:06+00:00] INFO: Processing package[bison] action install (build-essential::default line 58)
[2012-11-08T14:53:08+00:00] INFO: Processing package[mysql-client] action install (mysql::client line 46)
================================================================================
Error executing action `install` on resource 'package[mysql-client]'
================================================================================
Chef::Exceptions::Exec
----------------------
apt-get -q -y install mysql-client=5.5.24-0ubuntu0.12.04.1 returned 100, expected 0
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/client.rb
45: node['mysql']['client']['packages'].each do |mysql_pack|
46: package mysql_pack do
47: action :install
48: end
49: end
Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/client.rb:46:in `from_file'
package("mysql-client") do
retry_delay 2
retries 0
recipe_name "client"
action [:install]
cookbook_name :mysql
package_name "mysql-client"
end
[2012-11-08T14:53:09+00:00] ERROR: Running exception handlers
[2012-11-08T14:53:09+00:00] ERROR: Exception handlers complete
[2012-11-08T14:53:09+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2012-11-08T14:53:09+00:00] FATAL: Chef::Exceptions::Exec: package[mysql-client] (mysql::client line 46) had an error: Chef::Exceptions::Exec: apt-get -q -y install mysql-client=5.5.24-0ubuntu0.12.04.1 returned 100, expected 0
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
@gmanfunky
Copy link
Author

A fix is to include_recipe "apt" first. Don't know why this is needed. Guess it is a hidden requirement for the mysql and possibly the nginx module when using Ubuntu 12.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment