diff --git a/.fixtures.yml b/.fixtures.yml index 10a951d..f919178 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,6 +1,6 @@ fixtures: repositories: "stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib" - "staging": "https://github.com/nanliu/puppet-staging" + "staging": "https://github.com/voxpupuli/puppet-staging" symlinks: "mysql": "#{source_dir}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 12bc1b6..51f463c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,36 @@ +## Supported Release 3.8.0 +###Summary +This release adds Percona 5.7 support and compatibility with Ubuntu 16.04, in addition to various bugfixes. + +#### Features +- Adds support for Percona 5.7 +- Adds support for Ubuntu 16.04 (Xenial) + +#### Known Limitations +- The mysqlbackup.sh script will not work on MySQL 5.7.0 and up. + +#### Bugfixes +- Use mysql_install_db only with uniq defaults-extra-file +- Updates mysqlbackup.sh to ensure backup directory exist +- Loosen MariaDB recognition to fix it on Debian 8 +- Allow mysql::backup::mysqldump to access root_group in tests +- Fixed problem with ignoring parameters from global configs +- Fixes ordering issue that initialized mysqld before config is set +- (MODULES-1256) Fix parameters on OpenSUSE 12 +- Fixes install errors on Debian-based OS by configuring the base of includedir +- Configure the configfile location for mariadb +- Default mysqld_type return value should be 'mysql' if another type is not detected +- Make sure that bzip2 is installed before setting up the cron tab job using mysqlbackup.sh +- Fixes path issue on FreeBSD +- Check that /var/lib/mysql actually contains files +- Removes mysql regex when checking type +- (MODULES-2111) Add the system database to user related actions +- Updates default group for logfiles on Debian-based OS to 'adm' +- Fixes an issue with Amazon linux major release 4 installation +- Fixes 'mysql_install_db' script support on Gentoo +- Removes erroneous anchors to mysql::client from mysql::db +- Adds path to be able to find MySQL 5.5 installation on CentOS + ## Supported Release 3.7.0 ###Summary diff --git a/README.md b/README.md index 3287100..d0dc448 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ * [Customize configuration](#create-custom-configuration) * [Work with an existing server](#work-with-an-existing-server) * [Specify passwords](#specify-passwords) - * [Install Percona server on Centos](#install-percona-server-on-centos) + * [Install Percona server on CentOS](#install-percona-server-on-centos) 4. [Reference - An under-the-hood peek at what the module is doing and how](#reference) 5. [Limitations - OS compatibility, etc.](#limitations) 6. [Development - Guide for contributing to the module](#development) @@ -167,18 +167,16 @@ mysql::db { 'mydb': } ``` -### Install Percona server on Centos +### Install Percona server on CentOS This example shows how to do a minimal installation of a Percona server on a -Centos (has been tested on Puppet 4.4 / Centos 7 / Percona Server 5.7) -including the Percona server, client and bindingsi (including perl and python ones). +CentOS system. +This sets up the Percona server, client, and bindings (including Perl and Python bindings). You can customize this usage and update the version as needed. -Of course, you will probably want to customize it a bit more. and update the -version to the one you will want to have (trying to keep a coherence between -those) +This usage has been tested on Puppet 4.4 / CentOS 7 / Percona Server 5.7. **Note:** The installation of the yum repository is not part of this package -and is here only to show a full example of how you can install this. +and is here only to show a full example of how you can install. ```puppet yumrepo { 'percona': @@ -207,16 +205,15 @@ class {'mysql::server': } } -# Note: this is not needed in our case as installing Percona-Server-server-57 -# also installs Percona-Server-client-57. It is only here to show how to -# install the Percona MySQL client +# Note: Installing Percona-Server-server-57 also installs Percona-Server-client-57. +# This shows how to install the Percona MySQL client on its own class {'mysql::client': package_name => 'Percona-Server-client-57', package_ensure => '5.7.11-4.1.el7', } -# Note: those package are normally installed along with Percona-Server-server-57 -# so it's mostly here for the example in case you need to install the bindings. +# These packages are normally installed along with Percona-Server-server-57 +# If you needed to install the bindings, however, you could do so with this code class { 'mysql::bindings': client_dev_package_name => 'Percona-Server-shared-57', client_dev_package_ensure => '5.7.11-4.1.el7', @@ -908,14 +905,16 @@ loopback interfaces. Because those nodes aren't connected to the outside world, This module has been tested on: * RedHat Enterprise Linux 5, 6, 7 -* Debian 6, 7 +* Debian 6, 7, 8 * CentOS 5, 6, 7 -* Ubuntu 10.04, 12.04, 14.04 +* Ubuntu 10.04, 12.04, 14.04, 16.04 * Scientific Linux 5, 6 * SLES 11 Testing on other platforms has been minimal and cannot be guaranteed. +**Note:** The mysqlbackup.sh does not work and is not supported on MySQL 5.7 and greater. + ## Development Puppet Labs modules on the Puppet Forge are open projects, and community diff --git a/metadata.json b/metadata.json index 933d6ae..ded376f 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppetlabs-mysql", - "version": "3.7.0", + "version": "3.8.0", "author": "Puppet Labs", "summary": "Installs, configures, and manages the MySQL service.", "license": "Apache-2.0", @@ -9,7 +9,7 @@ "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"}, - {"name":"nanliu/staging","version_requirement":">= 1.0.1 < 2.0.0"} + {"name":"puppet/staging","version_requirement":">= 1.0.1 < 2.0.0"} ], "operatingsystem_support": [ { @@ -70,10 +70,6 @@ } ], "requirements": [ - { - "name": "pe", - "version_requirement": ">= 3.0.0 < 2015.4.0" - }, { "name": "puppet", "version_requirement": ">= 3.0.0 < 5.0.0" diff --git a/spec/acceptance/mysql_backup_spec.rb b/spec/acceptance/mysql_backup_spec.rb index c33fcf5..e5fcfd5 100644 --- a/spec/acceptance/mysql_backup_spec.rb +++ b/spec/acceptance/mysql_backup_spec.rb @@ -47,28 +47,40 @@ describe 'mysql::server::backup class' do describe 'mysqlbackup.sh' do it 'should run mysqlbackup.sh with no errors' do - shell("/usr/local/sbin/mysqlbackup.sh") do |r| - expect(r.stderr).to eq("") + pre_run + if ! version_is_greater_than('5.7.0') + shell("/usr/local/sbin/mysqlbackup.sh") do |r| + expect(r.stderr).to eq("") + end end end it 'should dump all databases to single file' do - shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| - expect(r.stdout).to match(/1/) - expect(r.exit_code).to be_zero + pre_run + if ! version_is_greater_than('5.7.0') + shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| + expect(r.stdout).to match(/1/) + expect(r.exit_code).to be_zero + end end end context 'should create one file per database per run' do it 'executes mysqlbackup.sh a second time' do - shell('sleep 1') - shell('/usr/local/sbin/mysqlbackup.sh') + pre_run + if ! version_is_greater_than('5.7.0') + shell('sleep 1') + shell('/usr/local/sbin/mysqlbackup.sh') + end end it 'creates at least one backup tarball' do - shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| - expect(r.stdout).to match(/2/) - expect(r.exit_code).to be_zero + pre_run + if ! version_is_greater_than('5.7.0') + shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| + expect(r.stdout).to match(/2/) + expect(r.exit_code).to be_zero + end end end end @@ -110,31 +122,43 @@ describe 'mysql::server::backup class' do describe 'mysqlbackup.sh' do it 'should run mysqlbackup.sh with no errors without root credentials' do - shell("HOME=/tmp/dontreadrootcredentials /usr/local/sbin/mysqlbackup.sh") do |r| - expect(r.stderr).to eq("") + pre_run + if ! version_is_greater_than('5.7.0') + shell("HOME=/tmp/dontreadrootcredentials /usr/local/sbin/mysqlbackup.sh") do |r| + expect(r.stderr).to eq("") + end end end it 'should create one file per database' do - ['backup1', 'backup2'].each do |database| - shell("ls -l /tmp/backups/mysql_backup_#{database}_*-*.sql.bz2 | wc -l") do |r| - expect(r.stdout).to match(/1/) - expect(r.exit_code).to be_zero + pre_run + if ! version_is_greater_than('5.7.0') + ['backup1', 'backup2'].each do |database| + shell("ls -l /tmp/backups/mysql_backup_#{database}_*-*.sql.bz2 | wc -l") do |r| + expect(r.stdout).to match(/1/) + expect(r.exit_code).to be_zero + end end end end context 'should create one file per database per run' do it 'executes mysqlbackup.sh a second time' do - shell('sleep 1') - shell('HOME=/tmp/dontreadrootcredentials /usr/local/sbin/mysqlbackup.sh') + pre_run + if ! version_is_greater_than('5.7.0') + shell('sleep 1') + shell('HOME=/tmp/dontreadrootcredentials /usr/local/sbin/mysqlbackup.sh') + end end it 'has one file per database per run' do - ['backup1', 'backup2'].each do |database| - shell("ls -l /tmp/backups/mysql_backup_#{database}_*-*.sql.bz2 | wc -l") do |r| - expect(r.stdout).to match(/2/) - expect(r.exit_code).to be_zero + pre_run + if ! version_is_greater_than('5.7.0') + ['backup1', 'backup2'].each do |database| + shell("ls -l /tmp/backups/mysql_backup_#{database}_*-*.sql.bz2 | wc -l") do |r| + expect(r.stdout).to match(/2/) + expect(r.exit_code).to be_zero + end end end end @@ -179,8 +203,11 @@ describe 'mysql::server::backup class' do end it 'should run mysqlbackup.sh with no errors' do - shell("/usr/local/sbin/mysqlbackup.sh") do |r| - expect(r.stderr).to eq("") + pre_run + if ! version_is_greater_than('5.7.0') + shell("/usr/local/sbin/mysqlbackup.sh") do |r| + expect(r.stderr).to eq("") + end end end end diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index c6908ea..07e19bd 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -49,7 +49,7 @@ RSpec.configure do |c| else on host, puppet('module','install','puppetlabs-stdlib','--version','3.2.0') on host, puppet('module','install','stahnma/epel') - on host, puppet('module','install','nanliu/staging') + on host, puppet('module','install','puppet/staging') end end end