Commit graph

319 commits

Author SHA1 Message Date
Hunter Haugen
4aa98b14ed Merge pull request #878 from bmjen/fix-grants
(MODULES-3716) Fix mysql_grant tests
2016-08-17 14:49:18 -07:00
Bryan Jen
561a6b067c (maint) clean up some tests and skip skip-name-resolve for now on 5.7+ 2016-08-17 13:48:09 -07:00
Bryan Jen
0ea083b643 (MODULES-3716) Fixes mysql_grant tests to create procedure before grant 2016-08-17 09:55:33 -07:00
Bryan Jen
d5d9d2ab8c Merge pull request #872 from QuentinMoss/mysql-server-id
MODULES-3711 - Add limit to mysql server ID generated value
2016-08-12 07:56:54 -07:00
Bryan Jen
561ad9a7a7 Fixes procedure grant tests for 5.7.12 2016-08-11 16:49:01 -07:00
Quentin Moss
8d4b83159e
Add limit to mysql server ID generated value 2016-08-09 17:05:22 -07:00
Bryan Jen
8c750a2748 Fixes tests for mysql_grant to work with 5.7.12 2016-08-09 16:34:09 -07:00
Bryan Jen
4492ec7483 Fix short password_hash on mysql_user tests 2016-08-09 15:46:44 -07:00
Bryan Jen
d9203e6e1f Fix broken plugin tests on Xenial 2016-08-09 15:20:42 -07:00
Helen Campbell
2a888f714d Fix for mysql version retrieval 2016-07-21 15:55:49 +01:00
TP Honey
ce892fb01f Merge pull request #856 from cfasnacht/ticket/6404-new_maxallowedpacket_parameter
add new backup dump parameter maxallowedpacket
2016-06-22 19:51:06 +01:00
Christian Fasnacht
e733df7388 add new backup dump parameter maxallowedpacket 2016-06-21 15:44:59 +02:00
tphoney
f183e492d9 fixing the failing unit tests for mysql_user 2016-06-21 13:35:10 +01:00
Jon Topper
ec5450ec75 Use facts for mysqld version discovery
Per https://tickets.puppetlabs.com/browse/MODULES-3441, the mysql
module has behaviour which varies by server version. The version is
discovered by running mysqld -V. On hosts without a MySQL server
package install, this fails, which means that contrary to the README,
it's not actually possible to use this module to manage a remote db.

This PR moves the version string discovery into a new fact,
mysqld_version which is used by the provider. This makes it possible
to configure the db version with a custom fact when a remote db
(eg AWS RDS) is being managed.
2016-06-15 10:43:50 +02:00
Bryan Jen
e2fad83c1c Skips mysqlbackup.sh tests on MySQL 5.7+ 2016-05-26 11:18:27 -07:00
Bryan Jen
1e8a537468 (maint) Switches nanliu-staging dependency to puppet-staging 2016-05-25 08:27:46 -07:00
Frank van Boven
b8d301527e (MODULES-2111) Add the system database to user related tables.
Change the behaviour of applying user and grant related changes to use
the system database of MySQL.

This is a workaround to fix a bug in MySQL
(https://bugs.mysql.com/bug.php?id=65923) that causes users and grants
to be replicated, even if the "mysql" database should not be replicated.
2016-05-02 14:52:44 +02:00
David Schmitt
04fb127bec Update to newest modulesync_configs [9ca280f] 2016-04-18 20:15:09 +01:00
David Schmitt
9aadcebb1b (maint) Add missing nanliu/staging module
The module is not really used, but its absence creates nasty warning
messages.
2016-04-05 14:52:29 +01:00
Hunter Haugen
f4fe313e65 Remove mysql_table_exists() function
This function is intended to check for the existence of a table before
declaring some resource, but this is neither portable (because functions
orun on the master, not the agent) nor one-run idempotent (because the
function would run before mysql is even installed, and would take two
runs to do anything).

The correct way of doing this would be to update the providers and
dependency ordering to handle the conditional states.

Luckily this was never released so it is backwards compatible.
2016-03-28 10:48:58 -07:00
Hunter Haugen
d8206aa4ec Allow mysql::backup::mysqldump to access root_group in tests 2016-03-25 15:31:15 -07:00
Jakub Husak
1a67c3868b Loosen MariaDB recognition to fix it on Debian 8 2016-03-18 16:26:48 +01:00
David Schmitt
f99a3fa78e (FM-4046) Update to current msync configs [006831f]
This moves all copyright statements to the NOTICE file in accordance with the ASFs guidelines on applying the Apache-2.0 license.
2016-02-16 16:33:44 +00:00
David Schmitt
7889a85d37 (FM-4049) Update to current msync configs [2c99161] 2016-01-27 14:44:53 +00:00
David Schmitt
95841d3a8c (FM-4563) fix tmpdir to be shared across examples 2016-01-19 10:45:25 +00:00
David Schmitt
d89062faff (FM-4563) skip idempotency tests on test cells that do have PUP-5016 unfixed
Arguably this decision should be extracted to a more central place,
like puppetlabs_spec_helper or the CI config.
2016-01-18 15:15:52 +00:00
David Schmitt
2de4597ecd (maint) refactor main acceptance suite
This reduces duplication of testing code and makes the intent of the tests
clearer.
2016-01-18 15:15:32 +00:00
Julien Pivotto
e30e0bc958 Re-Add the ability to set a empty string as option parameter
Prior to 136b1aa646 it was possible to
have an empty string as value of a my.cnf parameter, resulting in a line
with just the parameter name.

That commit re-enable that behavior that was removed by accident.
2016-01-08 14:00:31 +01:00
Robert Heinzmann
7efc93c3c5 Fixed new mysql_datadir provider on CentOS for MySQl 5.7.6 compatibility 2015-12-17 18:31:17 +01:00
Robert Heinzmann
bdf4d0f52d Fixed MySQL 5.7.6++ compatibility
- Added MySQL version and flavour detection support
  - Added mysql_datadir provider/type (replaces Exec[mysql_install_db])
  - Added version specific parameters my.cnf ([mysqld-5.X] sections)
  - Version specific user mangement SQL (ALTER USER for 5.7.6++ ...)

Rebased-By: David Schmitt <david.schmitt@puppetlabs.com>
2015-12-10 18:39:40 +00:00
Martin Hagstrom
61058b7610 Don't hash passwords that are already hashed 2015-11-19 07:54:10 +01:00
Artur Gadelshin
27323f74e6 (MODULES-2767) fix mysql_table_exists: add check for args.size, fix rspec test 2015-11-09 16:04:38 +03:00
Artur Gadelshin
e518abd97e (MODULES-2767) allow to check if table exists before grant 2015-11-07 19:23:20 +03:00
JT (Jonny)
b91630d7a3 Merge pull request #767 from jmk61/MODULES-2675
Fixes unique server_id within my.cnf Ticket/MODULES-2675
2015-10-27 14:52:34 +00:00
David Schmitt
5f49c45b2e (MODULES-2683) fix version compare to properly suppress show_diff for root password 2015-10-13 11:29:53 +01:00
David Schmitt
6527a3aa22 (MAINT) switch to rspec-puppet-facts
Switching out the puppet version, as puppet_facts does, does not work,
as this will confuse code that wants to use version-dependent features.

Instead this uses rspec-puppet-facts, which doesn't touch the puppet
version.
2015-10-13 11:29:42 +01:00
Joseph Karns
96c9d6d9a7 Fixes unique server_id within my.cnf, The issue was that the entire mac address was not being read in to generate the id. 2015-10-12 12:36:39 -04:00
Roman Mueller
afddc3ff7b Fix fetching the mysql_user password for MySQL >=5.7.6
The password column has been renamed to authentication_string in MySQL >=5.7.6.
By using: SELECT /*!50706 AUTHENTICATION_STRING AS */ PASSWORD the query will
continue to work in older versions as well as newer ones.
2015-09-30 18:55:26 +02:00
Morgan Haskel
97b8200a5f Improved user validation and munging
We want to make sure we are validating the entire user parameter (and
validating it consistently between mysql_user and mysql_grant).
Additionally, for munging we do not want to do anything that could
truncate the username.
2015-09-24 11:35:14 -07:00
Mickaël Canévet
6228846ae0 Fix when not managing config file
This code have been remove here 4bab65edcb (diff-0938042fe2382aeb10032aa7f8444995) but it is required otherwise we get an `Evaluation Error: Unknown variable: 'install_db_args'.` when using `manage_config_file = false`
2015-09-22 14:28:15 +02:00
JT (Jonny)
ced1a08c34 Merge pull request #682 from eems-leo/process-secret-file
Remove default install root password if set
2015-08-06 15:14:19 +01:00
Johnson Earls
6924dea7bd #2030 Only establish dependency between service and package if package is managed. 2015-08-06 14:23:47 +01:00
JT (Jonny)
2c8a822f25 Merge pull request #744 from danzilio/xtrabackup_enhancements
(MODULES-2340) Implement script functionality for xtrabackup provider
2015-08-06 13:57:02 +01:00
David Danzilio
a7a5c66bc4 Add support for postscript for xtrabackup provider
This commit implements the 'postscript' functionality for the xtrabackup
provider. It also adds a 'prescript' option to be executed before a
backup.
2015-08-05 16:15:25 -04:00
Hunter Haugen
c7de52013b Merge pull request #742 from redhat-cip/idempotent-config
Ensure idempotency between Puppet runs
2015-08-04 11:05:46 -07:00
Emilien Macchi
ba52d1d6e9 Ensure idempotency between Puppet runs
Running RHEL 7.1, puppetlabs-mysql is not idempotent.
After a second run, puppet tries to change the SElinux context:
/File[mysql-config-file]/seltype: seltype changed 'etc_t' to
'mysqld_etc_t'

Since packaging already manages SElinux labels, we should not let
Puppet doing it (default behavior).
This patch aims to set selinux_ignore_defaults to True for the
mysql-config-file File resource.

Thanks to that patch, Puppet will be indempotent between all runs on
RHEL platforms.
2015-08-04 13:38:03 -04:00
David Schmitt
502bdc9360 (maint) workaround PUP-3450 on Solaris 11 2015-07-27 14:27:23 +01:00
David Schmitt
253f74925e (maint) fix spec formatting
this configuration caused rspec to output messages twice on travis
2015-07-24 15:14:37 +01:00
Morgan Haskel
c6afa1181a Merge pull request #722 from igalic/lenght_check
length check for usernames should take mysql version into consideration
2015-06-25 11:18:24 -07:00
David Schmitt
097efe2d41 spec_helper_acceptance: Remove conflicting yum install
puppetlabs-release is not required anymore. run_puppet_install_helper
takes care of all that.
2015-06-18 12:13:55 +01:00