sous-chefs / mysql

Development repository for the mysql cookbook
https://supermarket.chef.io/cookbooks/mysql
Apache License 2.0
338 stars 690 forks source link

New MySQL version for Ubuntu 14.04 #472

Closed oradwell closed 8 years ago

oradwell commented 8 years ago

Cookbook version

8.0.2

Chef-client version

12.10.24

Platform Details

Ubuntu 14.04

Scenario:

Install MySQL 5.5

Steps to Reproduce:

mysql_service 'default' do
  initial_root_password 'password'
  action [:create, :start]
  socket '/var/run/mysqld/mysqld.sock'
end

Expected Result:

MySQL to be installed successfully

Actual Result:

==> default: [2016-09-14T12:21:33+00:00] ERROR: mysql_service[default] (myserver::mysql line 9) had an error: Mixlib::ShellOut::ShellCommandFailed: mysql_server_installation_package[default] (/tmp/vagrant-chef/8669fe112c737e422c3491de9a534503/cookbooks/mysql/libraries/mysql_service.rb line 36) had an error: Mixlib::ShellOut::ShellCommandFailed: apt_package[mysql-server-5.5] (/tmp/vagrant-chef/8669fe112c737e422c3491de9a534503/cookbooks/mysql/libraries/mysql_server_installation_package.rb line 17) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install mysql-server-5.5=5.5.50-0ubuntu0.14.04.1 ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: STDERR: E: Version '5.5.50-0ubuntu0.14.04.1' for 'mysql-server-5.5' was not found
==> default: ---- End output of apt-get -q -y install mysql-server-5.5=5.5.50-0ubuntu0.14.04.1 ----
==> default: Ran apt-get -q -y install mysql-server-5.5=5.5.50-0ubuntu0.14.04.1 returned 100
wilb commented 8 years ago

See my response in https://github.com/chef-cookbooks/mysql/issues/471

snehitgajjar commented 8 years ago

@wilb #471 doesn't say anything about 5.5.

wilb commented 8 years ago

Same issue is what I meant. I've opened a PR with the new packages https://github.com/chef-cookbooks/mysql/pull/474

snehitgajjar commented 8 years ago

@wilb I modified my code as below,

  mysql_client 'default' do
    package_version '5.5.52-0ubuntu0.12.04.1'
    version '5.5'
    action :create
  end

It still gives same error message.

wilb commented 8 years ago

Are you using the mysql2_chef_gem cookbook? That uses the mysql_client resource without a package_version so will hit the same error...

snehitgajjar commented 8 years ago

Yes I am using mysql2_chef_gem. So I need to wait until this PR gets merged?

wilb commented 8 years ago

Yeah, or temporarily reference my branch in your Berksfile.

@tas50 already merged the 16.04 updates before I had chance to send the others through - hopefully he'll pull the others in soon.

snehitgajjar commented 8 years ago

Thanks that will help. Are you going to create a PR for 5.5 and ubuntu14.04? I was thinking otherwise I can make change and create a PR.

wilb commented 8 years ago

5.5 for 12.04 + 14.04 are part of the same PR. Just realised there is 5.6 in 14.04 too though - will add that now.

snehitgajjar commented 8 years ago

Thing here is, I am using mysql2_chef_gem but it doesn't fail there. It fails before that when I do the mysql-client call which I posted above. I removed everything which was related to mysq2_che_gem still it failed.

wilb commented 8 years ago

Actually I don't think there is a new version of 5.6 in 14.04

apt-cache show mysql-client-5.6 | grep Version 
Version: 5.6.31-0ubuntu0.14.04.2

The tests pass for 12.04 with the updated version: kitchen test installation-client-package-55-ubuntu-1204

-----> Verifying ... Use /home/wilb/git/mysql/test/integration/installation_client_package-55 for testing

Command /usr/bin/mysql --version exit_status should eq 0 stdout should match /Distrib 5.5/

Finished in 0.04663 seconds (files

snehitgajjar commented 8 years ago

@wilb Thanks for reporting issue and PR. Saved a ton of time.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.