sous-chefs / mysql Goto Github PK
View Code? Open in Web Editor NEWDevelopment repository for the mysql cookbook
Home Page: https://supermarket.chef.io/cookbooks/mysql
License: Apache License 2.0
Development repository for the mysql cookbook
Home Page: https://supermarket.chef.io/cookbooks/mysql
License: Apache License 2.0
I think the .mysql_root file (that contains the actual mysql_root_password) should be removed upon completion of the recipe.
It poses a security risk for whenever the server might be kind of compromised.
Code that i'm speaking of is at file libraries/provider_mysql_service_ubuntu.rb
Lines 181 --> 188
execute 'create root marker' do
cmd = '/bin/echo'
cmd << " '#{Shellwords.escape(new_resource.parsed_server_root_password)}'"
cmd << ' > /etc/.mysql_root'
cmd << ' ;/bin/chmod 0600 /etc/.mysql_root'
command cmd
action :nothing
end
I’m trying to use kitchen-docker with chef_solo to provision mysql::server cookbook inside a docker container (host: centos6 with devicemapper backend storage and docker container is ubuntu14.04). but during the cook I got a “ERROR 2002 (HY000): Can't connect to local MySQL” during the execute[install-grants].
here is the output : https://gist.github.com/thpham/aa37d305c1341099e51c
Thanks
Hi,
I'm using this cookbook to install MySQL 5.6 on Amazon linux 2014.03. Setting a root password fails with the following output:
* execute[assign-root-password] action run [2014-11-26T10:10:35+00:00] INFO: Processing execute[assign-root-password] action run (/tmp/kitchen/cookbooks/mysql/libraries/provider_mysql_service_rhel.rb line 138)
ERROR 1045 (28000) : Access denied for user 'root'@'localhost' (using password: YES)
(skipped due to only_if)
[2014-11-26T10:10:35+00:00] DEBUG: Skipping execute[assign-root-password] due to only_if command `/usr/bin/mysql -u root -e 'show databases;'`
And since the root password is not set, following actions fail accordingly:
execute[install-grants] action run [2014-11-26T10:10:35+00:00] INFO: Processing execute[install-grants] action run (/tmp/kitchen/cookbooks/mysql/libraries/provider_mysql_service_rhel.rb line 91)
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000) : Access denied for user 'root'@'localhost' (using password: YES) ===============================================================================
Error executing action `run` on resource 'execute[install-grants]'
===============================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/mysql -u root -proot < /etc/mysql_grants.sql ----
STDOUT:
STDERR: Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
---- End output of /usr/bin/mysql -u root -proot < /etc/mysql_grants.sql ----
Ran /usr/bin/mysql -u root -proot < /etc/mysql_grants.sql returned 1
Resource Declaration:
---------------------
suppressed sensitive resource output
Compiled Resource:
------------------
suppressed sensitive resource output
Feedback welcome.
In a wrapper cookbook I have this line:
include_recipe "database"
Which is firing this exception:
Generated at 2014-11-03 17:40:12 -0430 Chef::Exceptions::RecipeNotFound: could not find recipe ruby for cookbook mysql
This happens in both Debian 7 and Ubuntu 12.04, using database cookbook version 2.3.0 and mysql cookbook version 5.6.1. I downgraded to mysql cookbook version 5.5.3 and with only this change everything is working again.
Thanks in advance for your reviewing.
the cookbook updates the mysql_grants.sql script with the new password and tries to run the sql with the new password, and fails because the password hasn't been changed.
update sql to new:
- update content in file /etc/mysql_grants.sql from 66ad13 to f17e62
--- /etc/mysql_grants.sql 2014-06-17 12:19:48.000000000 -0400
+++ /tmp/chef-rendered-template20140617-6040-12vl87g 2014-06-17 12:22:13.000000000 -0400
@@ -1,8 +1,8 @@
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
-UPDATE mysql.user SET Password=PASSWORD('mypassword') WHERE User='root';
+UPDATE mysql.user SET Password=PASSWORD('hello') WHERE User='root';
DELETE FROM mysql.user WHERE User='';
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';
-SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypassword');
-SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('mypassword');
+SET PASSWORD FOR 'root'@'localhost' = PASSWORD('hello');
+SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('hello');
and fails to execute the script:
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/mysql -u root -phello < /etc/mysql_grants.sql ----
STDOUT:
STDERR: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
---- End output of /usr/bin/mysql -u root -phello < /etc/mysql_grants.sql ----
Ran /usr/bin/mysql -u root -phello < /etc/mysql_grants.sql returned 1
Resource Declaration:
---------------------
In /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_rhel.rb
170: execute 'install-grants' do
171: cmd = "#{prefix_dir}/bin/mysql"
172: cmd << ' -u root '
173: cmd << "#{pass_string} < /etc/mysql_grants.sql"
174: command cmd
175: action :nothing
176: end
Since v5.3.0 this cookbook supports Suse but there's no supports
line in metadata.rb
.
Currently when we use cookbook latest version of mysql-server gets installed. It would be really helpful if user can control the version of this package.
I was running through a default installation and ran into an issue with the following AMI:
ami-99bef1a9
mysql_service 'default' do
bind_address '0.0.0.0'
port '3306'
version '5.5' # changed later, see notes
initial_root_password 'hunter2' #obviously fake
action [:create, :start]
end
mysql_config 'default' do
source 'mysite.cnf.erb'
notifies :restart, 'mysql_service[default]'
action :create
end
-- (BTW, it's super annoying that it doesn't download all dependencies automatically!)
yum repolist all | grep mysql
sudo yum-config-manager --disable mysql56-community
sudo yum-config-manager --enable mysql57-community
There is no RHEL7 "mysql" package offered by RH, so Chef obviously fails on mysql::client
on RHEL7 due to the packages hardcoded in https://github.com/opscode-cookbooks/mysql/blob/master/libraries/provider_mysql_client_rhel.rb
However, check this out. Via root shell, yum install mysql
picks mariadb
... but package "mysql"
fails.
# yum install mysql
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.37-1.el7_0 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
mariadb x86_64 1:5.5.37-1.el7_0 rhel-7-server-rpms 9.0 M
Transaction Summary
==============================================================================================================
Install 1 Package
...
# chef-apply -e 'package "mysql"'
Chef::Exceptions::Package
-------------------------
No version specified, and no candidate version available for mysql
...
Compiled Resource:
------------------
# Declared in /tmp/recipe-temporary-file20140923-26200-16cdxk4:1:in `run_chef_recipe'
package("mysql") do
action :install
retries 0
retry_delay 2
guard_interpreter :default
package_name "mysql"
cookbook_name "(chef-apply cookbook)"
recipe_name "(chef-apply recipe)"
end
Stock status function probably doing something stupid. Needs replacing.
on Ubuntu 14.04 i'm trying to install mysql server. I put the mysql::server in my run list followed by a wrapper cookbook what depends on mysql and include_recipe ''mysql::server" but the build fails.
The following packages have unmet dependencies:
mysql-server-5.6 : Depends: mysql-client-5.6 (>= 5.6.19-0ubuntu0.14.04.1) but it is not going to be installed
STDERR: E: Unable to correct problems, you have held broken packages.
---- End output of apt-get -q -y install mysql-server-5.6=5.6.19-0ubuntu0.14.04.1 ----
Ran apt-get -q -y install mysql-server-5.6=5.6.19-0ubuntu0.14.04.1 returned 100
If i put mysql::client in the run list it's ok but now i have to wrap the mysql::client cookbook so i can specify the 5.6 version. is that really necessary? i feel like i'm missing something.
my.cnf.erb
<% if @open_files_limit %>
open_files_limit = <%= @open_files_limit %>
<% end %>
Also note that the configuration template is not particularly flexible....wouldn't it be better to loop over an array of configurations keys/values ?
Is there an upgrade path for servers that are already initiated with mysql <=5.6.1?
Some installations require the socket access to mysql.
The different service names might also form problems is there a way to have the default mysql service also installed with 6.x?
After adding a site specific configuration for mysql as per the README of this cookbook the service is not restarted because it thinks nothing has changed.
Some output:
localhost * cookbook_file[/etc/mysql/conf.d/mysqld_tuning.cnf] action create
localhost
localhost
localhost - update content in file /etc/mysql/conf.d/mysqld_tuning.cnf from e3b0c4 to 53381c
<snip>
Recipe: mysql::server
localhost
localhost * mysql_service[default] action restart
localhost (up to date)
I am using Packer to build an Amazon AMI that installs mysql by mysql cookbook (version 5.5.1). It fails due to yum repo conflicts.
Linux version
[ec2-user@ip-xxxxxxxxx ~]$ cat /etc/system-release
Amazon Linux AMI release 2014.03
[ec2-user@ip-xxxxxxxxx ~]$ cat /etc/system-release-cpe
cpe:/o:amazon:linux:2014.03:ga
Chef messages
amazon-ebs: * execute[yum-makecache-mysql55-community] action run
amazon-ebs: - execute yum -q makecache --disablerepo=* --enablerepo=mysql55-community
amazon-ebs: * ruby_block[yum-cache-reload-mysql55-community] action create
amazon-ebs: - execute the ruby block yum-cache-reload-mysql55-community
amazon-ebs: * execute[yum-makecache-mysql55-community] action nothing (skipped due to action :nothing)
amazon-ebs: * ruby_block[yum-cache-reload-mysql55-community] action nothing (skipped due to action :nothing)
amazon-ebs:
amazon-ebs: - evaluate block and run any associated actions
amazon-ebs: * package[mysql-community-server] action install
amazon-ebs:
amazon-ebs: ================================================================================
amazon-ebs: Error executing action `install` on resource 'package[mysql-community-server]'
amazon-ebs: ================================================================================
amazon-ebs:
amazon-ebs: Chef::Exceptions::Exec
amazon-ebs: ----------------------
amazon-ebs: returned 1, expected 0
amazon-ebs:
amazon-ebs: Resource Declaration:
amazon-ebs: ---------------------
amazon-ebs: # In /tmp/packer-chef-solo/cookbooks-0/mysql/libraries/provider_mysql_service_rhel.rb
amazon-ebs:
amazon-ebs: 32: package new_resource.parsed_package_name do
amazon-ebs: 33: action new_resource.parsed_package_action
amazon-ebs: 34: version new_resource.parsed_package_version
amazon-ebs: 35: end
amazon-ebs: 36:
amazon-ebs:
amazon-ebs: Compiled Resource:
amazon-ebs: ------------------
amazon-ebs: # Declared in /tmp/packer-chef-solo/cookbooks-0/mysql/libraries/provider_mysql_service_rhel.rb:32:in `block in <class:Rhel>'
amazon-ebs:
amazon-ebs: package("mysql-community-server") do
amazon-ebs: action [:install]
amazon-ebs: retries 0
amazon-ebs: retry_delay 2
amazon-ebs: guard_interpreter :default
amazon-ebs: package_name "mysql-community-server"
amazon-ebs: version "5.5.39-5.el6"
amazon-ebs: timeout 900
amazon-ebs: cookbook_name :mysql
amazon-ebs: end
amazon-ebs:
amazon-ebs:
amazon-ebs: ================================================================================
amazon-ebs: Error executing action `create` on resource 'mysql_service[default]'
amazon-ebs: ================================================================================
amazon-ebs:
amazon-ebs: Chef::Exceptions::Exec
amazon-ebs: ----------------------
amazon-ebs: package[mysql-community-server] (/tmp/packer-chef-solo/cookbooks-0/mysql/libraries/provider_mysql_service_rhel.rb line 32) had an error: Chef::Exceptions::Exec: returned 1, expected 0
amazon-ebs:
amazon-ebs: Resource Declaration:
amazon-ebs: ---------------------
amazon-ebs: # In /tmp/packer-chef-solo/cookbooks-0/mysql/recipes/server.rb
amazon-ebs:
amazon-ebs: 20: mysql_service node['mysql']['service_name'] do
amazon-ebs: 21: version node['mysql']['version']
amazon-ebs: 22: port node['mysql']['port']
amazon-ebs: 23: data_dir node['mysql']['data_dir']
amazon-ebs: 24: server_root_password node['mysql']['server_root_password']
amazon-ebs: 25: server_debian_password node['mysql']['server_debian_password']
amazon-ebs: 26: server_repl_password node['mysql']['server_repl_password']
amazon-ebs: 27: allow_remote_root node['mysql']['allow_remote_root']
amazon-ebs: 28: remove_anonymous_users node['mysql']['remove_anonymous_users']
amazon-ebs: 29: remove_test_database node['mysql']['remove_test_database']
amazon-ebs: 30: root_network_acl node['mysql']['root_network_acl']
amazon-ebs: 31: package_version node['mysql']['server_package_version']
amazon-ebs: 32: package_action node['mysql']['server_package_action']
amazon-ebs: 33: action :create
amazon-ebs: 34: end
amazon-ebs:
amazon-ebs: Compiled Resource:
amazon-ebs: ------------------
amazon-ebs: # Declared in /tmp/packer-chef-solo/cookbooks-0/mysql/recipes/server.rb:20:in `from_file'
amazon-ebs:
amazon-ebs: mysql_service("default") do
amazon-ebs: action [:create]
amazon-ebs: retries 0
amazon-ebs: retry_delay 2
amazon-ebs: guard_interpreter :default
amazon-ebs: cookbook_name :mysql
amazon-ebs: recipe_name "server"
amazon-ebs: port "3306"
amazon-ebs: data_dir "/var/lib/mysql"
amazon-ebs: server_root_password "ilikerandompasswords"
amazon-ebs: server_debian_password "gnuslashlinux4ev4r"
amazon-ebs: remove_anonymous_users true
amazon-ebs: remove_test_database true
amazon-ebs: package_action "install"
amazon-ebs: end
amazon-ebs:
amazon-ebs:
amazon-ebs: Running handlers:
amazon-ebs: [2014-09-05T18:52:52+00:00] ERROR: Running exception handlers
amazon-ebs: Running handlers complete
amazon-ebs: [2014-09-05T18:52:52+00:00] ERROR: Exception handlers complete
amazon-ebs: [2014-09-05T18:52:52+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
amazon-ebs: Chef Client failed. 36 resources updated in 104.432105283 seconds
amazon-ebs: [2014-09-05T18:52:52+00:00] ERROR: mysql_service[default] (mysql::server line 20) had an error: Chef::Exceptions::Exec: package[mysql-community-server] (/tmp/packer-chef-solo/cookbooks-0/mysql/libraries/provider_mysql_service_rhel.rb line 32) had an error: Chef::Exceptions::Exec: returned 1, expected 0
amazon-ebs: [2014-09-05T18:52:52+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
After chef-client failed, I checked yum.repo.d/
[ec2-user@ip-xxxxxxxxx ~]$ ls /etc/yum.repos.d/
amzn-main.repo amzn-updates.repo mysql55-community.repo
amzn-nosrc.repo epel.repo
amzn-preview.repo epel-testing.repo
Then I tried to install mysql-community-server manually "sudo yum install mysql-community-server". I got the following message.
Transaction check error:
file /usr/lib64/mysql/libmysqlclient.so.18.0.0 from install of mysql-community-libs-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-libs-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysql from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/msql2mysql from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysql_config from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysql_find_rows from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysql_waitpid from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqlaccess from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqladmin from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqlbinlog from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqlcheck from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqldump from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqlimport from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqlshow from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqlslap from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysql.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysql_find_rows.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysql_waitpid.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqlaccess.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqladmin.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqldump.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqlslap.1.gz from install of mysql-community-client-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /etc/my.cnf from install of mysql-community-server-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-common-5.5.38-1.0.amzn1.x86_64
file /usr/bin/my_print_defaults from install of mysql-community-server-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/my_print_defaults.1.gz from install of mysql-community-server-5.5.39-5.el6.x86_64 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/msql2mysql from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysql_config from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysql_find_rows from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/bin/mysqlaccess from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysql.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysql_find_rows.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysql_waitpid.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqlaccess.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqladmin.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqldump.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
file /usr/share/man/man1/mysqlslap.1.gz from install of mysql-community-client-5.5.39-5.el6.i686 conflicts with file from package mysql55-5.5.38-1.0.amzn1.x86_64
Error Summary
-------------
I am using the wrapper cookbook :
node.set['mysql']['server_root_password'] = 'vagrant'
node.set['mysql']['port'] = '3308'
node.set['mysql']['data_dir'] = '/data'
include_recipe 'mysql::server'
And this is what i get when i run vagrant up
:
==> default: [2014-08-23T20:45:30+02:00] INFO: execute[preseed mysql-server] ran successfully
==> default:
==> default: ================================================================================
==> default: Error executing action `install` on resource 'package[mysql-server-5.5]'
==> default: ================================================================================
==> default:
==> default:
==> default: Chef::Exceptions::Exec
==> default: ----------------------
==> default: apt-get -q -y install mysql-server-5.5=5.5.38-0+wheezy1 returned 100, expected 0
==> default:
==> default:
==> default: Resource Declaration:
==> default:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_mysql_service_debian.rb
==> default:
==> default: 54: package new_resource.package_name do
==> default: 55: action :install
==> default: 56: end
==> default: 57:
==> default:
==> default:
==> default:
Informations about the distro :
$ lsb_release --all
Distributor ID: Debian
Description: Debian GNU/Linux 7.1 (wheezy)
Release: 7.1
Codename: wheezy
Currently client recipe only supports 5.1.71 version of mysql and mysql-devel packages installed it will be useful to be able to get newer version of packages installed for client recipe as well similar to server recipe.
I'm using version 6.0.1 of the mysql cookbook and chef version 11.16.4. I saw that this was supposedly fixed in version 5.6. I was not having this problem until just today. Anyone know what might be the trouble?
5.3.6
Ubuntu 14.04
Setting up a mysql cluster using corosync & pacemaker, it is necessary to avoid starting mysql service, because pacemaker is managing the execution of the mysql service. I didn't find a possibility to prevent mysql service being (re-)started at the chef-client run.
The mysql instance should remain in it's current status, that is "not running".
Result is a running mysql instance.
Looking to get a consensus on either removing or adding additional features to the repl user that is hard coded as:
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%'
Most replication wrapper cookbooks already address this user in a more granular way, which is better for security (allowing changing of the username as well as setting specific IP ranges).
I'm happy to write up a PR to either add additional features or remove this GRANT
, but want to get some community feedback on the issue before I proceed.
Hi
I've seen a lot of references to Windows in previous tickets and bugfixes, but the current version of the code does not seem to mention Windows (except in the Changelog, which references a previous version). Windows no longer seems to be listed in the Platforms file.
Is Windows currently supported by the cookbook? If not, are there other methods to install MySQL server with Chef?
Thanks
Tom
Hi,
I'm using Centos 6.5 as an example.
If I change node['mysql']['version']
to let's say 5.6. When I call mysql_service
it will install mysql-community-server, which will automatically install mysql-community-client
.
If in the same run_list I add mysql_client
it will try to install the hardcoded mysql . However it might fail because it's conflicting with mysql-community-client
.
By example on Centos you will have
Transaction Check Error:
file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package mysql-community-common-5.6.21-2.el6.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package mysql-community-common-5.6.21-2.el6.x86_64
file /usr/share/mysql/charsets/ascii.xml from
Or
Package mysql-5.1.73-3.el6_5.x86_64 is obsoleted by mysql-community-client-5.6.21-2.el6.x86_64 which is already installed
<= returns 0. If obsoletes=1
is set in your yum.confOn ubuntu 14, it will install mysql-client5.5 which will break mysql-server-5.6 :
# dpkg -l | grep -i mysql
ii libdbd-mysql-perl 4.025-1 amd64 Perl5 database interface to the MySQL database
ii libmysqlclient-dev 5.5.40-0ubuntu0.14.04.1 amd64 MySQL database development files
ii libmysqlclient18:amd64 5.5.40-0ubuntu0.14.04.1 amd64 MySQL database client library
ii mysql-client-5.5 5.5.40-0ubuntu0.14.04.1 amd64 MySQL database client binaries
ii mysql-client-core-5.5 5.5.40-0ubuntu0.14.04.1 amd64 MySQL database core client binaries
ii mysql-common 5.5.40-0ubuntu0.14.04.1 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-common-5.6 5.6.19-0ubuntu0.14.04.1 all MySQL 5.6 specific common files, e.g. /etc/mysql/conf.d/my-5.6.cnf
rc mysql-server-5.6 5.6.19-0ubuntu0.14.04.1 amd64 MySQL database server binaries and system database setup
ii mysql-server-core-5.6 5.6.19-0ubuntu0.14.04.1 amd64 MySQL database server binaries
I'm not adding mysql_client to my run_list it's done automatically by https://github.com/opscode-cookbooks/database => https://github.com/opscode-cookbooks/mysql-chef_gem/blob/master/libraries/provider_mysql_chef_gem.rb#L17
do you think we could have the same logic than https://github.com/opscode-cookbooks/mysql/blob/master/libraries/helpers.rb#L65-L67 for the client package name?
command: mysql -u root -pPassword
-> Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
command: sudo service mysql-default status
-> mysql-default start/running, process 15787
Ubuntu 14.04
Config:
mysql_service 'default' do
port '3306'
version '5.6'
initial_root_password 'change_me'
action [:create, :start]
end
mysql_client 'default' do
version '5.6'
action :create
end
Using mysql-multi cookbook I've found that after deploying a master server, it finishes installing every template but server is not restarted.
Trying to find a solution, I realized that if I modify restart action provided by provider_service_mysql_ubuntu.rb to something similar to:
action :restart do
service 'mysql' do
provider Chef::Provider::Service::Upstart
supports :restart => true
action :restart
end.run_action(:restart)
end
Server finally got restarted.
Someone has a similar problem? Am I using wrong mysql_service LWRP?
Thanks in advance
New versions of MySQL (>= 5.6.8) set a random password for unattended installations (ie: RPMs). This causes the mysql cookbook to fail to set the desired password for the server because it can no longer login as root with the (previously default) empty password string.
See documentation on the mysql site:
http://dev.mysql.com/doc/refman/5.6/en/mysql-install-db.html#option_mysql_install_db_random-passwords
The provider_mysql_service_.rb libraries need to be updated to read the randomly generated password from ~/mysql_secret and use that to login and change the server password to the desired password.
For example (actual implementation may vary):
ruby_block 'assign-root-password' do
block do
escaped_password=Shellwords.escape(new_resource.server_root_password)
node.default['mysql_random_password']=`pw=\"\"; for i in $(cat ~/.mysql_secret) ; do pw=$i ; done; echo -n $pw`
command = "#{prefix_dir}/bin/mysqladmin -u root -p#{node['mysql_random_password']} password #{escaped_password}"
output=`#{command}`
end
action :create
end
Also, the ordering of the resource execution needs to be modified such that the my.cnf template is created before the mysql service is started.
Hi,
This question is partly because I'm setting up automatic chef testing too, and can't figure out your workflow.
It seems you only run rubocop and chefspec through travis, why no foodcritic or kitchen tests there?
Also, the guard does user all tests except kitchen, is this purely because kitchen takes too long?
The division in the Gemfile with lint and unit doesn't seem used and where does the --without kitchen_vagrant with bundler come into play?
Thanks
Any reason this is set default to on in my.cnf?
I'm attempting to add mysql support to https://github.com/opscode-cookbooks/sqitch, but sqitch requires mysql 5.6.4+.
I'm also trying to use https://github.com/opscode-cookbooks/database, which uses https://github.com/opscode-cookbooks/mysql-chef_gem to configure my connections.
So it would be lovely to have mysql::client
support 5.6 on ubuntu.
For example, the following resources within the provider_mysql_service_rhel provider need the sensitive flag. This needs to be extended to all platform providers.
template '/etc/mysql_grants.sql'
execute 'install-grants'
execute 'assign-root-password'
execute 'create root marker'
The error log:
[2014-10-08T04:13:38+00:00] INFO: Processing mysql_service[default] action create (mysql::server line 20)
==> app:
==> app: ================================================================================
==> app: Error executing action `create` on resource 'mysql_service[default]'
==> app: ================================================================================
==> app:
==> app:
==> app: NoMethodError
==> app: -------------
==> app: No resource or method named `execute' for `Chef::Provider::MysqlService::Ubuntu "none"'
==> app:
==> app:
==> app: Cookbook Trace:
==> app: ---------------
==> app:
==> app: /var/vagrant-chef/chef-solo-1/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb:60:in `block in <class:Ubuntu>'
==> app:
==> app:
==> app: Resource Declaration:
==> app: ---------------------
==> app: # In /var/vagrant-chef/chef-solo-1/cookbooks/mysql/recipes/server.rb
==> app:
==> app: 20: mysql_service node['mysql']['service_name'] do
==> app: 21: version node['mysql']['version']
==> app: 22: port node['mysql']['port']
==> app: 23: data_dir node['mysql']['data_dir']
==> app: 24: server_root_password node['mysql']['server_root_password']
==> app: 25: server_debian_password node['mysql']['server_debian_password']
==> app: 26: server_repl_password node['mysql']['server_repl_password']
==> app: 27: allow_remote_root node['mysql']['allow_remote_root']
==> app: 28: remove_anonymous_users node['mysql']['remove_anonymous_users']
==> app: 29: remove_test_database node['mysql']['remove_test_database']
==> app: 30: root_network_acl node['mysql']['root_network_acl']
==> app: 31: package_version node['mysql']['server_package_version']
==> app: 32: package_action node['mysql']['server_package_action']
==> app: 33: action :create
==> app: 34: end
==> app:
==> app:
==> app:
==> app: Compiled Resource:
==> app: ------------------
==> app: # Declared in /var/vagrant-chef/chef-solo-1/cookbooks/mysql/recipes/server.rb:20:in `from_file'
==> app:
==> app: mysql_service("default") do
==> app: action [:create]
==> app: retries 0
==> app: retry_delay 2
==> app: cookbook_name :mysql
==> app: recipe_name "server"
==> app: port "3306"
==> app: data_dir "/var/lib/mysql"
==> app: server_root_password "serverrootpassword"
==> app: server_debian_password "gnuslashlinux4ev4r"
==> app: remove_anonymous_users true
==> app: remove_test_database true
==> app: package_action "install"
==> app: end
==> app:
==> app:
==> app:
==> app: [2014-10-08T04:13:38+00:00] INFO: Running queued delayed notifications before re-raising exception
==> app: [2014-10-08T04:13:38+00:00] ERROR: Running exception handlers
==> app: [2014-10-08T04:13:38+00:00] ERROR: Exception handlers complete
==> app: [2014-10-08T04:13:38+00:00] FATAL: Stacktrace dumped to /vagrant/.vagrant/file_cache_path/chef-stacktrace.out
==> app: [2014-10-08T04:13:38+00:00] ERROR: mysql_service[default] (mysql::server line 20) had an error: NoMethodError: No resource or method named `execute' for `Chef::Provider::MysqlService::Ubuntu "none"'
==> app: [2014-10-08T04:13:38+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
It's on vagrant box ubuntu/trusty64
I have I am using cookbook 6.0.4 with Chef 12.0.3 on Chef Vragrant Centos 6.6 box. Virtual box version 4.3.
I run into the following problem using the example script from the README of this cookbook.
Chef will fail to execute command /sbin/service mysql-default start
.
After vagrant ssh into the box, I can start 'sudo service mysql-default' with root user.
And I wonder if this is the cause, it has 'debian' but I am on centos:
==> default: 27: service "#{new_resource.name} :start #{mysql_name}" do
==> default: 28: service_name mysql_name
==> default: 29: provider Chef::Provider::Service::Init::Insserv if node['platform'] == 'debian'
==> default: 30: supports restart: true, status: true
==> default: 31: action [:enable, :start]
==> default: 32: end
==> default: 33: end
==> default:
PS C:\Users\bill\VMs\cheftest\myapp> vagrant provision
==> default: Loading Berkshelf datafile...
==> default: Sharing cookbooks with VM
==> default: Updating Vagrant's Berkshelf...
==> default: Resolving cookbook dependencies...
==> default: Fetching 'myapp' from source at .
==> default: Fetching cookbook index from https://supermarket.getchef.com...
==> default: Using apt (2.6.0)
==> default: Using apache2 (3.0.0)
==> default: Using hhvm (0.6.0)
==> default: Using iptables (0.14.0)
==> default: Using java (1.29.0)
==> default: Using logrotate (1.7.0)
==> default: Using myapp (0.1.0) from source at .
==> default: Using mysql (6.0.4)
==> default: Using rbac (1.0.2)
==> default: Using resource-control (0.1.1)
==> default: Using smf (2.2.1)
==> default: Using yum (3.5.1)
==> default: Using yum-mysql-community (0.1.11)
==> default: Vendoring apache2 (3.0.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz
8af-default/apache2
==> default: Vendoring apt (2.6.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af-
default/apt
==> default: Vendoring hhvm (0.6.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af
-default/hhvm
==> default: Vendoring iptables (0.14.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1b
dz8af-default/iptables
==> default: Vendoring java (1.29.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8a
f-default/java
==> default: Vendoring logrotate (1.7.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1b
dz8af-default/logrotate
==> default: Vendoring myapp (0.1.0) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8a
f-default/myapp
==> default: Vendoring mysql (6.0.4) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8a
f-default/mysql
==> default: Vendoring rbac (1.0.2) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af
-default/rbac
==> default: Vendoring resource-control (0.1.1) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-
5244-1bdz8af-default/resource-control
==> default: Vendoring smf (2.2.1) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af-
default/smf
==> default: Vendoring yum (3.5.1) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141223-5244-1bdz8af-
default/yum
==> default: Vendoring yum-mysql-community (0.1.11) to C:/Users/bill/.berkshelf/vagrant-berkshelf/shelves/berkshelf20141
223-5244-1bdz8af-default/yum-mysql-community
==> default: Chef 12.0.3 Omnibus package is already installed.
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: [2014-12-23T17:06:34+00:00] INFO: Forking chef instance to converge...
==> default: [2014-12-23T17:06:34+00:00] INFO: *** Chef 12.0.3 ***
==> default: [2014-12-23T17:06:34+00:00] INFO: Chef-client pid: 4105
==> default: [2014-12-23T17:06:37+00:00] INFO: Setting the run_list to ["recipe[myapp::default]"] from CLI options
==> default: [2014-12-23T17:06:37+00:00] INFO: Run List is [recipe[myapp::default]]
==> default: [2014-12-23T17:06:37+00:00] INFO: Run List expands to [myapp::default]
==> default: [2014-12-23T17:06:37+00:00] INFO: Starting Chef Run for myapp-berkshelf
==> default: [2014-12-23T17:06:37+00:00] INFO: Running start handlers
==> default: [2014-12-23T17:06:37+00:00] INFO: Start handlers complete.
==> default: [2014-12-23T17:06:39+00:00] INFO: Ignoring apache2::mod_authn_core. not available until apache 2.4
==> default: [2014-12-23T17:06:39+00:00] WARN: Cloning resource attributes for execute[a2dissite default.conf] from prio
r resource (CHEF-3694)
==> default: [2014-12-23T17:06:39+00:00] WARN: Previous execute[a2dissite default.conf]: /tmp/vagrant-chef-3/chef-solo-1
/cookbooks/apache2/definitions/apache_site.rb:35:in `block in from_file'
==> default: [2014-12-23T17:06:39+00:00] WARN: Current execute[a2dissite default.conf]: /tmp/vagrant-chef-3/chef-solo-1
/cookbooks/apache2/definitions/apache_site.rb:35:in `block in from_file'
==> default: [2014-12-23T17:06:44+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] created file /etc/yum.r
epos.d/mysql57-community.repo
==> default: [2014-12-23T17:06:44+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] updated file contents /
etc/yum.repos.d/mysql57-community.repo
==> default: [2014-12-23T17:06:44+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] mode changed to 644
==> default: [2014-12-23T17:06:45+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] sending run action to e
xecute[yum-makecache-mysql57-community] (immediate)
==> default: [2014-12-23T17:06:47+00:00] INFO: execute[yum-makecache-mysql57-community] ran successfully
==> default: [2014-12-23T17:06:47+00:00] INFO: template[/etc/yum.repos.d/mysql57-community.repo] sending create action t
o ruby_block[yum-cache-reload-mysql57-community] (immediate)
==> default: [2014-12-23T17:06:47+00:00] INFO: ruby_block[yum-cache-reload-mysql57-community] called
==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default] owner changed to 27
==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default] group changed to 27
==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default/conf.d] owner changed to 27
==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /etc/mysql-default/conf.d] group changed to 27
==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /var/run/mysql-default] owner changed to 27
==> default: [2014-12-23T17:06:51+00:00] INFO: directory[default :create /var/run/mysql-default] group changed to 27
==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/log/mysql-default] owner changed to 27
==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/log/mysql-default] group changed to 27
==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/lib/mysql-default] owner changed to 27
==> default: [2014-12-23T17:06:52+00:00] INFO: directory[default :create /var/lib/mysql-default] group changed to 27
==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] backed up to /var/che
f/backup/etc/mysql-default/my.cnf.chef-20141223170653.091418
==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] updated file contents
/etc/mysql-default/my.cnf
==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] owner changed to 27
==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :create /etc/mysql-default/my.cnf] group changed to 27
==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :start /etc/init.d/mysql-default] backed up to /var/chef
/backup/etc/init.d/mysql-default.chef-20141223170653.511102
==> default: [2014-12-23T17:06:53+00:00] INFO: template[default :start /etc/init.d/mysql-default] updated file contents
/etc/init.d/mysql-default
==> default: ================================================================================
==> default: Error executing action `start` on resource 'service[default :start mysql-default]'
==> default: ================================================================================
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default:
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of /sbin/service mysql-default start ----
==> default: STDOUT: Starting MySQL instance mysql-default
==> default: Starting mysql-default: [ OK ]
==> default: STDERR:
==> default: ---- End output of /sbin/service mysql-default start ----
==> default: Ran /sbin/service mysql-default start returned 1
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_mysql_service_sysvinit.rb
==> default:
==> default: 27: service "#{new_resource.name} :start #{mysql_name}" do
==> default: 28: service_name mysql_name
==> default: 29: provider Chef::Provider::Service::Init::Insserv if node['platform'] == 'debian'
==> default: 30: supports restart: true, status: true
==> default: 31: action [:enable, :start]
==> default: 32: end
==> default: 33: end
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_mysql_service_sysvinit.rb:
27:in `block in <class:Sysvinit>'
==> default:
==> default: service("default :start mysql-default") do
==> default: action [:enable, :start]
==> default: supports {:restart=>true, :status=>true}
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: service_name "mysql-default"
==> default: enabled true
==> default: pattern "default :start mysql-default"
==> default: declared_type :service
==> default: cookbook_name :myapp
==> default: end
==> default:
==> default: [2014-12-23T17:07:24+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: ================================================================================
==> default: Error executing action `start` on resource 'mysql_service[default]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: service[default :start mysql-default] (/tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libraries/provider_m
ysql_service_sysvinit.rb line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0],
but received '1'
==> default: ---- Begin output of /sbin/service mysql-default start ----
==> default: STDOUT: Starting MySQL instance mysql-default
==> default: Starting mysql-default: [ OK ]
==> default: STDERR:
==> default: ---- End output of /sbin/service mysql-default start ----
==> default: Ran /sbin/service mysql-default start returned 1
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/myapp/recipes/database.rb
==> default:
==> default: 1: mysql_service 'default' do
==> default: 2: port '3306'
==> default: 3: version '5.7'
==> default: 4: initial_root_password 'change me'
==> default: 5: action [:create, :start]
==> default: 6: end
==> default: 7:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/myapp/recipes/database.rb:1:in `from_file'
==> default:
==> default: mysql_service("default") do
==> default: action [:create, :start]
==> default: updated true
==> default: updated_by_last_action true
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: declared_type :mysql_service
==> default: cookbook_name :myapp
==> default: recipe_name "database"
==> default: port "3306"
==> default: version "5.7"
==> default: initial_root_password "change me"
==> default: package_action :install
==> default: instance "default"
==> default: run_user "mysql"
==> default: run_group "mysql"
==> default: charset "utf8"
==> default: end
==> default: [2014-12-23T17:07:24+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2014-12-23T17:07:24+00:00] ERROR: Running exception handlers
==> default: [2014-12-23T17:07:24+00:00] ERROR: Exception handlers complete
==> default: [2014-12-23T17:07:24+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2014-12-23T17:07:25+00:00] ERROR: mysql_service[default] (myapp::database line 1) had an error: Mixlib::Sh
ellOut::ShellCommandFailed: service[default :start mysql-default] (/tmp/vagrant-chef-3/chef-solo-1/cookbooks/mysql/libra
ries/provider_mysql_service_sysvinit.rb line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to
exit with [0], but received '1'
==> default: ---- Begin output of /sbin/service mysql-default start ----
==> default: STDOUT: Starting MySQL instance mysql-default
==> default: Starting mysql-default: [ OK ]
==> default: STDERR:
==> default: ---- End output of /sbin/service mysql-default start ----
==> default: Ran /sbin/service mysql-default start returned 1
==> default: [2014-12-23T17:07:25+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessf
ully (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.
PS C:\Users\bill\VMs\cheftest\myapp> vagrant ssh
Last login: Tue Dec 23 16:53:23 2014 from 10.0.2.2
[vagrant@myapp-berkshelf ~]$ sudo service mysql-default status
mysql-default is not running
[vagrant@myapp-berkshelf ~]$ sudo service mysql-default start
Starting MySQL instance mysql-default
Starting mysql-default: [ OK ]
[vagrant@myapp-berkshelf ~]$
[vagrant@myapp-berkshelf ~]$
Using it with the database cookbook. Getting the following error with a script that works fine with v5.3.6.
==> default: ================================================================================
==> default: Error executing action `create` on resource 'mysql_database[databasename]'
==> default: ================================================================================
==> default:
==> default:
==> default: TypeError
==> default: ---------
==> default: Mysql is not a class
==> default:
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/database/libraries/provider_database_mysql.rb:29:in `load_current_resource'
==> default:
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/appserver/recipes/dbserver.rb
==> default:
==> default:
==> default:
==> default: 53: mysql_database db['database'] do
==> default:
==> default: 54: connection mysql_connection
==> default:
==> default: 55: action :create
==> default:
==> default: 56: end
==> default:
==> default: 57:
==> default:
==> default:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/appserver/recipes/dbserver.rb:53:in `block in from_file'
==> default:
==> default:
==> default:
==> default: mysql_database("databasename") do
==> default:
==> default: provider Chef::Provider::Database::Mysql
==> default:
==> default: action [:create]
==> default:
==> default: retries 0
==> default:
==> default: retry_delay 2
==> default:
==> default: guard_interpreter :default
==> default:
==> default: database_name "databasename"
==> default:
==> default: cookbook_name :appserver
==> default:
==> default: recipe_name "dbserver"
==> default:
==> default: connection {:host=>"localhost", :username=>"root", :password=>"XXXXXXXXX"}
==> default:
==> default: end
Hi!
I'm getting this error when trying to use mysql cookbook version 5.5.4. It happens on a fresh machine. Please see if you can fix it and thanks in advance!
Recipe: mysql::server
create
on resource 'mysql_service[default]'undefined method `sensitive' for Chef::Resource::Execute
/var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb:61:in block (2 levels) in <class:Ubuntu>' /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb:60:in
block in class:Ubuntu'
20: mysql_service node['mysql']['service_name'] do
21: version node['mysql']['version']
22: port node['mysql']['port']
23: data_dir node['mysql']['data_dir']
24: server_root_password node['mysql']['server_root_password']
25: server_debian_password node['mysql']['server_debian_password']
26: server_repl_password node['mysql']['server_repl_password']
27: allow_remote_root node['mysql']['allow_remote_root']
28: remove_anonymous_users node['mysql']['remove_anonymous_users']
29: remove_test_database node['mysql']['remove_test_database']
30: root_network_acl node['mysql']['root_network_acl']
31: package_version node['mysql']['server_package_version']
32: package_action node['mysql']['server_package_action']
33: action :create
34: end
mysql_service("default") do
action [:create]
retries 0
retry_delay 2
guard_interpreter :default
cookbook_name "mysql"
recipe_name "server"
port "3306"
data_dir "/var/lib/mysql"
server_root_password "my_root_password"
server_debian_password "my_debian_password"
server_repl_password "my_repl_password"
remove_anonymous_users true
remove_test_database true
package_action "install"
end
Looks like something is wrong with the upstart script. This should be easily reproducible.
My recipe:
mysql_client 'default' do
version '5.6'
end
mysql_service 'default' do
port '3306'
version '5.6'
initial_root_password 'password'
action [:create, :start]
end
After successfully converging, I try rebooting. MySQL no longer seems accessible...
$ mysql -h 127.0.0.1
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
Is the server running?
$ sudo service mysql-default status
mysql-default stop/waiting
Can I start it manually? Nope.. just sits here forever
$ sudo service mysql-default start
If I provision after reboot...
$ vagrant provision
...
==> default: [2014-12-16T21:16:02+00:00] INFO: directory[default :create /run/mysql-default] created directory /run/mysql-default
==> default: [2014-12-16T21:16:02+00:00] INFO: directory[default :create /run/mysql-default] owner changed to 106
==> default: [2014-12-16T21:16:02+00:00] INFO: directory[default :create /run/mysql-default] group changed to 114
==> default: [2014-12-16T21:16:02+00:00] INFO: directory[default :create /run/mysql-default] mode changed to 755
==> default: [2014-12-16T21:16:27+00:00] INFO: service[default :start mysql-default] started
==> default: [2014-12-16T21:16:27+00:00] INFO: Chef Run complete in 27.988659866 seconds
CentOS 6.5 platform, set attribute ['mysql']['server_package_version'] = "5.6", running of recipe fails when attempting download package "mysql-server" version "5.6". Could mysql 5.6(mysql-community-server) for RHEL be added to helpers?
53dcd23 introduced a space after the "-p" switch in the pass_string method of libraries/helpers_debian.rb. This breaks installing mysql_grants etc and I believe this should be reverted.
The MySQL docs are explicit that "for the short form, if the password value is given, it must follow the option letter with no intervening space". Not clear as to why this change was introduced to "fix debian pass_string" as noted in the commit.
http://dev.mysql.com/doc/refman/5.5/en/command-line-options.html
Trying to get mysql up and running and I have a cookbook with the following in the default recipe...
include_recipe 'mysql::server'
include_recipe 'mysql::client'
No attributes, nothing other than defaults. Testing using the vagrant box 'chef/ubuntu-14.04'
ls -al /var/run/mysqld
immediately after the chef run yields...
srwxrwxrwx 1 mysql mysql 0 Sep 4 04:40 mysqld.sock
-rw-rw---- 1 mysql mysql 5 Sep 4 04:40 mysql.pid
I wait five minutes and then check the directory again... and it's empty. The following is at the end of my mysql error.log at /var/log/mysql/error.log:
Version: '5.5.38-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
140904 4:35:13 [Note] /usr/sbin/mysqld: Normal shutdown
140904 4:35:13 [Note] Event Scheduler: Purging the queue. 0 events
140904 4:35:13 InnoDB: Starting shutdown...
140904 4:35:14 InnoDB: Shutdown completed; log sequence number 1595685
140904 4:35:14 [Note] /usr/sbin/mysqld: Shutdown complete
ps ax | grep mysql
and service mysql status
both show that mysql is still running, so it's just the socket that's gone.
Is this a known bug on your part? I would assume that using the mysql server recipe in this cookbook with all defaults should result in a stable service, so something's got to be wrong.
When using the following:
depends 'mysql', '~> 6.0'
Then, in a recipe:
mysql_service 'default' do
bind_address '0.0.0.0'
...
end
I get the following fatal error:
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/frontend_server/recipes/default.rb
================================================================================
←[0mNoMethodError
-------------
undefined method `bind_address' for Chef::Resource::MysqlService
←[0mCookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/frontend_server/recipes/databases.rb:57:in `block in from_file'
←[0m /tmp/kitchen/cache/cookbooks/frontend_server/recipes/databases.rb:56:in `from_file'
←[0m /tmp/kitchen/cache/cookbooks/frontend_server/recipes/default.rb:22:in `from_file'
←[0mRelevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/frontend_server/recipes/databases.rb:
←[0m
←[0m 50: connection_params = {
←[0m 51: host: master_db_host[0]['ip'],
←[0m 52: username: 'root',
←[0m 53: password: master_db_host[0]['root_pw']
←[0m 54: }
←[0m 55: else
←[0m 56: mysql_service 'default' do
←[0m 57>> bind_address '0.0.0.0'
←[0m 58: port '3306'
←[0m 59: version '5.5'
←[0m 60: initial_root_password node['mysql']['server_root_password']
←[0m 61: action [:create, :start]
←[0m 62: end
←[0m 63:
←[0m 64: mysql_config 'default' do
←[0m 65: source 'mysite.cnf.erb'
←[0m 66: notifies :restart, 'mysql_service[default]'
←[0m
←[0m←[0m
Running handlers:
[2014-12-18T10:41:36+00:00] ERROR: Running exception handlers
Running handlers complete
←[0m[2014-12-18T10:41:36+00:00] ERROR: Exception handlers complete
[2014-12-18T10:41:36+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 50.174843339 seconds
[2014-12-18T10:41:36+00:00] ERROR: undefined method `bind_address' for Chef::Resource::MysqlService
[2014-12-18T10:41:38+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
As it was proposed in the version 4 (and can still be found in the postgres cookbook for example), it would be nice to bring back the ramdomly generated SQL password for root account when nothing is specified in attributes.
This is a very nice feature which (IMO) & it helps (and force) dev & ops to learn & use "mysql admin" good practices.
Also, why did it was removed :-( ?
Reopened -> COOK-2515
I did some work trying to get this cookbook to work on sles 11.3.
I tried to reuse the provider_mysql_service_rhel.rb to satisfy sles like so: https://gist.github.com/hagzag/7f7f7c6125d688959fe5
The client was less complicated (IMO) -> adding provider_mysql_client_suse.rb see: https://gist.github.com/hagzag/78f78ac72bedf541ab23
I also modified the helpers library to support suse -> adding lines 51-52:
when platform_family == 'suse'
platform_version.to_s
and 237-244:
'suse' => {
'default_data_dir' => '/var/lib/mysql',
'default_version' => '5.5',
'11.3' => {
'package_name' => 'mysql',
'service_name' => 'mysql'
}
}
BTW I tried 11 & 11.3 considering the to_i.to_s methods translate 11.3 to 11.
What am I missing ? how can I help push SLES support forward ?
This is how I'm using the recipe:
node.set['mysql']['server_root_password'] = 'yolo'
include_recipe 'mysql::server'
template '/etc/mysql/conf.d/mysite.cnf' do
owner 'mysql'
source 'mysite.cnf.erb'
#notifies :restart, 'mysql_service[default]'
end
I am getting this output:
Chef::Exceptions::FileNotFound
Cookbook 'mysql' (4.0.14) does not contain a file at any of these locations:
templates/ubuntu-14.04/init-mysql.conf.erb
templates/ubuntu/init-mysql.conf.erb
templates/default/init-mysql.conf.erbThis cookbook does contain: ['debian.cnf.erb','grants.sql.erb','my.cnf.erb','mysql-server.seed.erb','port_mysql.erb','usr.sbin.mysqld.erb','init-mysql.conf.erb','init-mysql.conf.erb','my.ini.erb']
Resource Declaration:
In /var/chef/cache/cookbooks/mysql/recipes/_server_debian.rb
77: template '/etc/init/mysql.conf' do
78: source 'init-mysql.conf.erb'
79: end
80:Compiled Resource:
Declared in /var/chef/cache/cookbooks/mysql/recipes/_server_debian.rb:77:in `from_file'
template("/etc/init/mysql.conf") do
provider Chef::Provider::Template
action "create"
retries 0
retry_delay 2
path "/etc/init/mysql.conf"
backup 5
atomic_update true
source "init-mysql.conf.erb"
cookbook_name "mysql"
recipe_name "_server_debian"
end
Anyone else having these issues?
Is there a reason that debian-6 is not supported? It is not in the list of platforms and does not work at the moment.
would it be enough to add a debian-6 definition:
Basically if you use the mysql::server recipe on a Ubuntu 14.04 instance and you want to install the mysql::client recipe chef will fail because there's a package conflict.
Ubuntu 14.04 defaults to mysql 5.5 but if you want to install 5.6 then you need to specify the package which is what the server recipe does by installing mysql-server-5.6 but when it comes to the client recipe it will always try to install mysql-client which then causes a dependancy conflict in APT.
the lines that brings this issue is https://github.com/opscode-cookbooks/mysql/blob/master/libraries/provider_mysql_client_ubuntu.rb#L25
If you change the file to install mysql-client-5.6 chef will run correctly but I'm unsure how to make this work dynamically in the cookbook.
I see that we can specify the charset and collation for deprecated mysql version(see templates/default/deprecated/my.cnf.erb
)
But its not possible to set up custom collation and charset for 5.5 or 5.6 version.
Is it indented? Is there a way to specify charset and collation?
This change (from about a week ago):
Breaks compatibility with Ubuntu 10.04, for which mysql-client-5.5 isn't available (only 5.1).
Use run_state
instead of node
attributes to set passwords (e.g. node['mysql']['server_root_password']) as with sous-chefs/jenkins#158
The problem happens when you create a new MySQL server using the cookbook, then by default it will create an ib_logfile0
and ib_logfile1
file of 5Mb. If an additional cnf file has specified innodb_log_file_size then MySQL will not be able to restart because the value in cnf file does not match the files on disk.
2014-09-22_03:01:16.08395 INFO: Processing service[mysql] action restart (/var/chef/git/tmp/librarian/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb line 196)
2014-09-22_03:01:19.50757
2014-09-22_03:01:19.50767 ================================================================================
2014-09-22_03:01:19.50772 Error executing action `restart` on resource 'service[mysql]'
2014-09-22_03:01:19.50777 ================================================================================
2014-09-22_03:01:19.50781
2014-09-22_03:01:19.50782 Chef::Exceptions::Exec
2014-09-22_03:01:19.50792 ----------------------
2014-09-22_03:01:19.50797 /sbin/restart mysql returned 1, expected 0
2014-09-22_03:01:19.50803
2014-09-22_03:01:19.50805 Resource Declaration:
2014-09-22_03:01:19.50819 ---------------------
2014-09-22_03:01:19.50825 # In /var/chef/git/tmp/librarian/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb
2014-09-22_03:01:19.50827
2014-09-22_03:01:19.50828 196: service 'mysql' do
2014-09-22_03:01:19.50830 197: provider Chef::Provider::Service::Upstart
2014-09-22_03:01:19.50831 198: supports :restart => true
2014-09-22_03:01:19.50834 199: action :restart
2014-09-22_03:01:19.50836 200: end
2014-09-22_03:01:19.50838 201: end
2014-09-22_03:01:19.50843
2014-09-22_03:01:19.50845 Compiled Resource:
2014-09-22_03:01:19.50854 ------------------
2014-09-22_03:01:19.50855 # Declared in /var/chef/git/tmp/librarian/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb:196:in `block (2 levels) in <class:Ubuntu>'
2014-09-22_03:01:19.50856
2014-09-22_03:01:19.50857 service("mysql") do
2014-09-22_03:01:19.50859 provider Chef::Provider::Service::Upstart
2014-09-22_03:01:19.50860 action [:restart]
2014-09-22_03:01:19.50861 supports {:restart=>true}
2014-09-22_03:01:19.50862 retries 0
2014-09-22_03:01:19.50864 retry_delay 2
2014-09-22_03:01:19.50865 guard_interpreter :default
2014-09-22_03:01:19.50866 service_name "mysql"
2014-09-22_03:01:19.50867 pattern "mysql"
2014-09-22_03:01:19.50868 cookbook_name :mysql
2014-09-22_03:01:19.50869 end
2014-09-22_03:01:19.50870
2014-09-22_03:01:19.50875 INFO: Running queued delayed notifications before re-raising exception
2014-09-22_03:01:19.50991
2014-09-22_03:01:19.50993 ================================================================================
2014-09-22_03:01:19.50998 Error executing action `restart` on resource 'mysql_service[default]'
2014-09-22_03:01:19.51003 ================================================================================
2014-09-22_03:01:19.51007
2014-09-22_03:01:19.51008 Chef::Exceptions::Exec
2014-09-22_03:01:19.51016 ----------------------
2014-09-22_03:01:19.51020 service[mysql] (/var/chef/git/tmp/librarian/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb line 196) had an error: Chef::Exceptions::Exec: /sbin/restart mysql returned 1, expected 0
2014-09-22_03:01:19.51025
2014-09-22_03:01:19.51026 Resource Declaration:
2014-09-22_03:01:19.51034 ---------------------
2014-09-22_03:01:19.51038 # In /var/chef/git/tmp/librarian/cookbooks/mysql/recipes/server.rb
2014-09-22_03:01:19.51040
2014-09-22_03:01:19.51042 20: mysql_service node['mysql']['service_name'] do
2014-09-22_03:01:19.51044 21: version node['mysql']['version']
2014-09-22_03:01:19.51044 22: port node['mysql']['port']
2014-09-22_03:01:19.51046 23: data_dir node['mysql']['data_dir']
2014-09-22_03:01:19.51047 24: server_root_password node['mysql']['server_root_password']
2014-09-22_03:01:19.51047 25: server_debian_password node['mysql']['server_debian_password']
2014-09-22_03:01:19.51049 26: server_repl_password node['mysql']['server_repl_password']
2014-09-22_03:01:19.51049 27: allow_remote_root node['mysql']['allow_remote_root']
2014-09-22_03:01:19.51051 28: remove_anonymous_users node['mysql']['remove_anonymous_users']
2014-09-22_03:01:19.51052 29: remove_test_database node['mysql']['remove_test_database']
2014-09-22_03:01:19.51053 30: root_network_acl node['mysql']['root_network_acl']
2014-09-22_03:01:19.51054 31: version node['mysql']['version']
2014-09-22_03:01:19.51054 32: action :create
2014-09-22_03:01:19.51056 33: end
[snip]
2014-09-22_03:01:20.82157 FATAL: Chef::Exceptions::Exec: mysql_service[default] (mysql::server line 20) had an error: Chef::Exceptions::Exec: service[mysql] (/var/chef/git/tmp/librarian/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb line 196) had an error: Chef::Exceptions::Exec: /sbin/restart mysql returned 1, expected 0
Trying to start MySQL manually:
/var/lib/mysql# mysqld --verbose
140922 3:02:32 [Note] Plugin 'FEDERATED' is disabled.
140922 3:02:32 InnoDB: The InnoDB memory heap is disabled
140922 3:02:32 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140922 3:02:32 InnoDB: Compressed tables use zlib 1.2.3.4
140922 3:02:32 InnoDB: Initializing buffer pool, size = 4.0G
140922 3:02:32 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 536870912 bytes!
140922 3:02:32 [ERROR] Plugin 'InnoDB' init function returned error.
140922 3:02:32 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140922 3:02:32 [ERROR] Unknown/unsupported storage engine: InnoDB
140922 3:02:32 [ERROR] Aborting
My node is Ubuntu 14.04
My run-list is this
knife[:run_list] = "recipe[apache2]", "recipe[mysql::server]", "recipe[php]"
And I changed default.rb
to the following
#
default['mysql']['service_name'] = 'default'
default['mysql']['version'] = '5.5' # I tried both 5.5 and 5.6 #
# passwords
default['mysql']['server_root_password'] = '123456'
default['mysql']['server_debian_password'] = '5501466'
default['mysql']['server_repl_password'] = nil
# used in grants.sql
default['mysql']['allow_remote_root'] = false
default['mysql']['remove_anonymous_users'] = true
default['mysql']['root_network_acl'] = nil
case node['platform']
when 'smartos'
default['mysql']['data_dir'] = '/opt/local/lib/mysql'
else
default['mysql']['data_dir'] = '/var/lib/mysql'
end
# port
default['mysql']['port'] = '3306'
# server package version and action
default['mysql']['server_package_version'] = nil
default['mysql']['server_package_action'] = 'install'
default['mysql']['enable_utf8'] = 'true'
Here's the error log when I bootstrap the node
172.28.128.3 Recipe: mysql::server
172.28.128.3 * mysql_service[default] action createRecipe: <Dynamically Defined Resource>
172.28.128.3 * package[debconf-utils] action install (up to date)
172.28.128.3 * directory[/var/cache/local/preseeding] action create (up to date)
172.28.128.3 * template[/var/cache/local/preseeding/mysql-server.seed] action create (up to date)
172.28.128.3 * execute[preseed mysql-server] action nothing (skipped due to action :nothing)
172.28.128.3 * package[mysql-server-5.5] action install
172.28.128.3 ================================================================================
172.28.128.3 Error executing action `install` on resource 'package[mysql-server-5.5]'
172.28.128.3 ================================================================================
172.28.128.3
172.28.128.3
172.28.128.3 Mixlib::ShellOut::ShellCommandFailed
172.28.128.3 ------------------------------------
172.28.128.3 Expected process to exit with [0], but received '100'
172.28.128.3 ---- Begin output of apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 ----
172.28.128.3 STDOUT: Reading package lists...
172.28.128.3 Building dependency tree...
172.28.128.3 Reading state information...
172.28.128.3 The following extra packages will be installed:
172.28.128.3 libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
172.28.128.3 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
172.28.128.3 mysql-server-core-5.5
172.28.128.3 Suggested packages:
172.28.128.3 libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
172.28.128.3 libsql-statement-perl libipc-sharedcache-perl tinyca mailx
172.28.128.3 The following NEW packages will be installed:
172.28.128.3 libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
172.28.128.3 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
172.28.128.3 mysql-server-5.5 mysql-server-core-5.5
172.28.128.3 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
172.28.128.3 Need to get 7936 kB/9014 kB of archives.
172.28.128.3 After this operation, 96.4 MB of additional disk space will be used.
172.28.128.3 Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.24 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-common all 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main libmysqlclient18 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-core-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-server-core-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-server-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 STDERR: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-common_5.5.37-0ubuntu0.14.04.1_all.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
172.28.128.3 ---- End output of apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 ----
172.28.128.3 Ran apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 returned 100
172.28.128.3
172.28.128.3
172.28.128.3 Resource Declaration:
172.28.128.3 ---------------------
172.28.128.3 # In /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb
172.28.128.3
172.28.128.3 55: package new_resource.parsed_package_name do
172.28.128.3 56: action new_resource.parsed_package_action
172.28.128.3 57: version new_resource.parsed_package_version
172.28.128.3 58: end
172.28.128.3 59:
172.28.128.3
172.28.128.3
172.28.128.3
172.28.128.3 Compiled Resource:
172.28.128.3 ------------------
172.28.128.3 # Declared in /var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb:55:in `block in <class:Ubuntu>'
172.28.128.3
172.28.128.3 package("mysql-server-5.5") do
172.28.128.3 action [:install]
172.28.128.3 retries 0
172.28.128.3 retry_delay 2
172.28.128.3 package_name "mysql-server-5.5"
172.28.128.3 version "5.5.37-0ubuntu0.14.04.1"
172.28.128.3 cookbook_name "mysql"
172.28.128.3 end
172.28.128.3
172.28.128.3
172.28.128.3
172.28.128.3
172.28.128.3 ================================================================================
172.28.128.3 Error executing action `create` on resource 'mysql_service[default]'
172.28.128.3 ================================================================================
172.28.128.3
172.28.128.3
172.28.128.3 Mixlib::ShellOut::ShellCommandFailed
172.28.128.3 ------------------------------------
172.28.128.3 package[mysql-server-5.5] (/var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb line 55) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
172.28.128.3 ---- Begin output of apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 ----
172.28.128.3 STDOUT: Reading package lists...
172.28.128.3 Building dependency tree...
172.28.128.3 Reading state information...
172.28.128.3 The following extra packages will be installed:
172.28.128.3 libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
172.28.128.3 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
172.28.128.3 mysql-server-core-5.5
172.28.128.3 Suggested packages:
172.28.128.3 libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
172.28.128.3 libsql-statement-perl libipc-sharedcache-perl tinyca mailx
172.28.128.3 The following NEW packages will be installed:
172.28.128.3 libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
172.28.128.3 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
172.28.128.3 mysql-server-5.5 mysql-server-core-5.5
172.28.128.3 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
172.28.128.3 Need to get 7936 kB/9014 kB of archives.
172.28.128.3 After this operation, 96.4 MB of additional disk space will be used.
172.28.128.3 Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.24 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-common all 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main libmysqlclient18 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-core-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-server-core-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-server-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 STDERR: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-common_5.5.37-0ubuntu0.14.04.1_all.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
172.28.128.3 ---- End output of apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 ----
172.28.128.3 Ran apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 returned 100
172.28.128.3
172.28.128.3
172.28.128.3 Resource Declaration:
172.28.128.3 ---------------------
172.28.128.3 # In /var/chef/cache/cookbooks/mysql/recipes/server.rb
172.28.128.3
172.28.128.3 20: mysql_service node['mysql']['service_name'] do
172.28.128.3 21: version node['mysql']['version']
172.28.128.3 22: port node['mysql']['port']
172.28.128.3 23: data_dir node['mysql']['data_dir']
172.28.128.3 24: server_root_password node['mysql']['server_root_password']
172.28.128.3 25: server_debian_password node['mysql']['server_debian_password']
172.28.128.3 26: server_repl_password node['mysql']['server_repl_password']
172.28.128.3 27: allow_remote_root node['mysql']['allow_remote_root']
172.28.128.3 28: remove_anonymous_users node['mysql']['remove_anonymous_users']
172.28.128.3 29: remove_test_database node['mysql']['remove_test_database']
172.28.128.3 30: root_network_acl node['mysql']['root_network_acl']
172.28.128.3 31: package_version node['mysql']['server_package_version']
172.28.128.3 32: package_action node['mysql']['server_package_action']
172.28.128.3 33: enable_utf8 node['mysql']['enable_utf8']
172.28.128.3 34: action :create
172.28.128.3 35: end
172.28.128.3
172.28.128.3
172.28.128.3
172.28.128.3 Compiled Resource:
172.28.128.3 ------------------
172.28.128.3 # Declared in /var/chef/cache/cookbooks/mysql/recipes/server.rb:20:in `from_file'
172.28.128.3
172.28.128.3 mysql_service("default") do
172.28.128.3 action [:create]
172.28.128.3 retries 0
172.28.128.3 retry_delay 2
172.28.128.3 cookbook_name "mysql"
172.28.128.3 recipe_name "server"
172.28.128.3 version "5.5"
172.28.128.3 port "3306"
172.28.128.3 data_dir "/var/lib/mysql"
172.28.128.3 server_root_password "123456"
172.28.128.3 server_debian_password "5501466"
172.28.128.3 remove_anonymous_users true
172.28.128.3 remove_test_database true
172.28.128.3 package_action "install"
172.28.128.3 enable_utf8 "true"
172.28.128.3 end
172.28.128.3
172.28.128.3
172.28.128.3
172.28.128.3 [2014-11-16T08:45:13+00:00] ERROR: Running exception handlers
172.28.128.3 [2014-11-16T08:45:13+00:00] ERROR: Exception handlers complete
172.28.128.3 [2014-11-16T08:45:13+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
172.28.128.3 Chef Client failed. 3 resources updated
172.28.128.3 [2014-11-16T08:45:16+00:00] ERROR: mysql_service[default] (mysql::server line 20) had an error: Mixlib::ShellOut::ShellCommandFailed: package[mysql-server-5.5] (/var/chef/cache/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb line 55) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
172.28.128.3 ---- Begin output of apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 ----
172.28.128.3 STDOUT: Reading package lists...
172.28.128.3 Building dependency tree...
172.28.128.3 Reading state information...
172.28.128.3 The following extra packages will be installed:
172.28.128.3 libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
172.28.128.3 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
172.28.128.3 mysql-server-core-5.5
172.28.128.3 Suggested packages:
172.28.128.3 libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
172.28.128.3 libsql-statement-perl libipc-sharedcache-perl tinyca mailx
172.28.128.3 The following NEW packages will be installed:
172.28.128.3 libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
172.28.128.3 libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
172.28.128.3 mysql-server-5.5 mysql-server-core-5.5
172.28.128.3 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
172.28.128.3 Need to get 7936 kB/9014 kB of archives.
172.28.128.3 After this operation, 96.4 MB of additional disk space will be used.
172.28.128.3 Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.24 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-common all 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main libmysqlclient18 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-core-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-server-core-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 Err http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-server-5.5 amd64 5.5.37-0ubuntu0.14.04.1
172.28.128.3 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3 STDERR: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-common_5.5.37-0ubuntu0.14.04.1_all.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-core-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-5.5_5.5.37-0ubuntu0.14.04.1_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
172.28.128.3
172.28.128.3 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
172.28.128.3 ---- End output of apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 ----
172.28.128.3 Ran apt-get -q -y install mysql-server-5.5=5.5.37-0ubuntu0.14.04.1 returned 100
172.28.128.3 [2014-11-16T08:45:16+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
when installing mysql::server on an Amazon distro the platform_version: 2014.03 is but requires me to install the community version.
Hi there, I can't tell if this is an issue with the mysql cookbook or my architecture. I'm deploying a mysql instance with this.
I followed the basic example you guys have in the readme, with one small modification since it couldn't find the my.cnf.erb in the mysql cookbook, I placed it in my digitalocean cookbook templates folder.
Then when I ran it, I got this output. It can't find the @config.anything. At first, it was @config.name, which should default to the resource name 'default'. I tried using the config_name to force it and it still failed. Then I removed any reference to @config.name and it just went to the next @config parm in the template @config.charset, also not found.
I assumed that this meant it could not find anything in the @config instance.
Any help to get me going on this would be great.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.