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

No candidate version available for mysql-community-server on CentOS 6.8 #470

Closed free0ldman closed 8 years ago

free0ldman commented 8 years ago

Cookbook version

8.0.2

Chef-client version

12.13.30

Platform Details

CentOS 6.8

Scenario:

In my recipe, I was trying to do a simple install and start of MySQL service, code as below:

mysql_service 'default' do port '3306' version '5.6' bind_address '0.0.0.0' initial_root_password 'MyPass' action [:create, :start] end

Steps to Reproduce:

Using above codes

Expected Result:

MySQL gets installed and started.

Actual Result:

Error shows no candidate for mysql-community-server was found:

micmicsuarez commented 8 years ago

I got the same issue here.

Cookbook version

8.0.2

Chef-client version

12.13.37

Platform Details

CentOS 6.7

Recipe

I used the sample recipe in mysql cookbook documentation.

mysql_service 'foo' do
  port '3306'
  version '5.5'
  initial_root_password 'changeme'
  action [:create, :start]
end

mysql_config 'foo' do
  source 'my.cnf.erb'
  notifies :restart, 'mysql_service[foo]'
  action :create
end

This is the exception.

 ================================================================================
           Error executing action `create` on resource 'mysql_service[instance-1]'
           ================================================================================

           Chef::Exceptions::Package
           -------------------------
           mysql_server_installation_package[instance-1] (/tmp/kitchen/cache/cookbooks/mysql/libraries/mysql_service.rb line 36) had an error: Chef::Exceptions::Package: yum_package[mysql-community-server] (/tmp/kitchen/cache/cookbooks/mysql/libraries/mysql_server_installation_package.rb line 17) had an error: Chef::Exceptions::Package: No candidate version available for mysql-community-server
micmicsuarez commented 8 years ago

hi @free0ldman, I made it work by using the old version of mysql. I tested it both CentOS 6.7 and CentOS 6.8.

I added this in metadata.rb.

depends 'mysql', '~> 6.0'
shreyasgune commented 7 years ago

This workaround works! I still wonder why the later versions of mysql won't work.

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.