From f2182eb3ba3977461bd04094fe6155e23f4f2583 Mon Sep 17 00:00:00 2001 From: Eimhin Laverty Date: Tue, 30 Jul 2019 13:22:46 +0100 Subject: [PATCH] (MODULES-9632) Release prep v10.1.0 --- CHANGELOG.md | 14 +++++--- REFERENCE.md | 67 ++++++++++++++++++++++++++++++++++++-- manifests/server/backup.pp | 2 +- metadata.json | 4 +-- 4 files changed, 76 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 869063d50..6278b2f2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). -## [v10.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.0.0) (2019-06-26) +## [v10.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.1.0) (2019-07-30) -[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.1.0...v10.0.0) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.0.0...v10.1.0) -### Changed +### Added -- \(FM-7709\) pdksync and remove beaker [\#1210](https://github.com/puppetlabs/puppetlabs-mysql/pull/1210) ([tphoney](https://github.com/tphoney)) +- Allow backup::mysqldump::time to accept monthday, month, weekday [\#1214](https://github.com/puppetlabs/puppetlabs-mysql/pull/1214) ([malakai97](https://github.com/malakai97)) + +## [v10.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.0.0) (2019-06-26) + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.1.0...v10.0.0) ### Added @@ -150,7 +154,7 @@ All notable changes to this project will be documented in this file. The format - \(FM-5985\) - Addition of support for Ubuntu 18.04 to mysql [\#1104](https://github.com/puppetlabs/puppetlabs-mysql/pull/1104) ([david22swan](https://github.com/david22swan)) - \(MODULES-7439\) - Implementing beaker-testmode\_switcher [\#1095](https://github.com/puppetlabs/puppetlabs-mysql/pull/1095) ([pmcmaw](https://github.com/pmcmaw)) - Support for optional\_\_args and prescript to mysqldump backup provider [\#1083](https://github.com/puppetlabs/puppetlabs-mysql/pull/1083) ([eputnam](https://github.com/eputnam)) -- Allow empty user passwords [\#1075](https://github.com/puppetlabs/puppetlabs-mysql/pull/1075) ([disappear89](https://github.com/disappear89)) +- Allow empty user passwords [\#1075](https://github.com/puppetlabs/puppetlabs-mysql/pull/1075) ([ThoTischner](https://github.com/ThoTischner)) - Add user tls\_options and grant options to mysql::db [\#1065](https://github.com/puppetlabs/puppetlabs-mysql/pull/1065) ([edestecd](https://github.com/edestecd)) - Use puppet4 functions-api [\#1044](https://github.com/puppetlabs/puppetlabs-mysql/pull/1044) ([juliantodt](https://github.com/juliantodt)) - Replaced 'DROP USER' with 'DROP USER IF EXISTS' [\#942](https://github.com/puppetlabs/puppetlabs-mysql/pull/942) ([libertamohamed](https://github.com/libertamohamed)) diff --git a/REFERENCE.md b/REFERENCE.md index 1e2814b89..2f009c048 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -18,7 +18,7 @@ _Private Classes_ * `mysql::backup::mysqlbackup`: Manage the mysqlbackup client. * `mysql::backup::mysqldump`: "Provider" for mysqldump -* `mysql::backup::xtrabackup`: "Provider" for Percona XtraBackup or MariaBackup +* `mysql::backup::xtrabackup`: "Provider" for Percona XtraBackup/MariaBackup * `mysql::bindings::client_dev`: Private class for installing client development bindings * `mysql::bindings::daemon_dev`: Private class for installing daemon development bindings * `mysql::bindings::java`: Private class for installing java language bindings. @@ -56,6 +56,8 @@ _Private Resource types_ **Functions** +* [`mysql::normalise_and_deepmerge`](#mysqlnormalise_and_deepmerge): Recursively merges two or more hashes together, normalises keys with differing use of dashesh and underscores, +then returns the resulting hash. * [`mysql::password`](#mysqlpassword): Hash a string as mysql's "PASSWORD()" function would do it * [`mysql::strip_hash`](#mysqlstrip_hash): When given a hash this function strips out all blank entries. * [`mysql_password`](#mysql_password): Hash a string as mysql's "PASSWORD()" function would do it @@ -650,6 +652,11 @@ class { 'mysql::server::backup': backuppassword => 'mypassword', backupdir => '/tmp/backups', } +class { 'mysql::server::backup': + backupmethod => 'mariabackup', + provider => 'xtrabackup', + backupdir => '/tmp/backups', +} ``` #### Parameters @@ -712,6 +719,14 @@ Whether or not to compress the backup (when using the mysqldump provider) Default value: `true` +##### `backupmethod` + +Data type: `Any` + +The execution binary for backing up. ex. mysqldump, xtrabackup, mariabackup + +Default value: `undef` + ##### `backuprotate` Data type: `Any` @@ -740,9 +755,9 @@ Default value: `false` Data type: `Any` -Databases to backup (required if using xtrabackup provider). +Databases to backup (required if using xtrabackup provider). By default `[]` will back up all databases. -Default value: `[]` (backs up all databases) +Default value: [] ##### `file_per_database` @@ -1201,6 +1216,52 @@ The name of the user. This uses the 'username@hostname' or username@hostname. ## Functions +### mysql::normalise_and_deepmerge + +Type: Ruby 4.x API + +- When there is a duplicate key that is a hash, they are recursively merged. +- When there is a duplicate key that is not a hash, the key in the rightmost hash will "win." +- When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), the rightmost style will win. + +#### Examples + +##### + +```puppet +$hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } +$hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } +$merged_hash = mysql::normalise_and_deepmerge($hash1, $hash2) +# The resulting hash is equivalent to: +# $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } +``` + +#### `mysql::normalise_and_deepmerge(Any *$args)` + +- When there is a duplicate key that is a hash, they are recursively merged. +- When there is a duplicate key that is not a hash, the key in the rightmost hash will "win." +- When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), the rightmost style will win. + +Returns: `Any` + +##### Examples + +###### + +```puppet +$hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } +$hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } +$merged_hash = mysql::normalise_and_deepmerge($hash1, $hash2) +# The resulting hash is equivalent to: +# $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } +``` + +##### `*args` + +Data type: `Any` + + + ### mysql::password Type: Ruby 4.x API diff --git a/manifests/server/backup.pp b/manifests/server/backup.pp index a21eb5925..7e6e32513 100644 --- a/manifests/server/backup.pp +++ b/manifests/server/backup.pp @@ -39,7 +39,7 @@ # @param delete_before_dump # Whether to delete old .sql files before backing up. Setting to true deletes old files before backing up, while setting to false deletes them after backup. # @param backupdatabases -# Databases to backup (if using xtrabackup provider). +# Databases to backup (required if using xtrabackup provider). By default `[]` will back up all databases. # @param file_per_database # Use file per database mode creating one file per database backup. # @param include_routines diff --git a/metadata.json b/metadata.json index 1ba0f06ed..d014c7c67 100644 --- a/metadata.json +++ b/metadata.json @@ -1,10 +1,10 @@ { "name": "puppetlabs-mysql", - "version": "10.0.0", + "version": "10.1.0", "author": "puppetlabs", "summary": "Installs, configures, and manages the MySQL service.", "license": "Apache-2.0", - "source": "git://github.com/puppetlabs/puppetlabs-mysql.git", + "source": "git://github.com/puppetlabs/puppetlabs-mysql", "project_page": "http://github.com/puppetlabs/puppetlabs-mysql", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", "dependencies": [