Commit graph

355 commits

Author SHA1 Message Date
LaurentCrisci
0ad4f71934 Added bzip2 package support on mysqldump backup
The script used by this mysqldump class, mysqlbackup.sh, requires bzcat
which is part of the bzip2 package.

This patch will make sure that bzip2 is installed before setting up the
cron tab job using mysqlbackup.sh
2016-04-25 13:17:33 +01:00
Monty Solomon
d472d5bcf1 Use defaults_extra_file first; add debug messages
Remove added notices and revert to debug

Add support for Percona

Use log-error for mysqld initialize

Improve description of error log argument

Should be --log-error
2016-04-21 01:00:40 -04:00
David Schmitt
f8ae5bf6ba (FM-5050) Configure the configfile's location for mariadb
As a follow-up to the includedir fix, with mariadb, $includedir is not
set, but the configfile is still placed in a directory that will only
be created by installing the package. This patch adds that directory,
if necessary.
2016-04-14 14:33:43 +01:00
David Schmitt
232ef1818c (FM-5050) Configure the base of includedir
Without this change installing mysql fails with the following errors on Debian and
Ubuntu:

Error: Cannot create /etc/mysql/conf.d; parent directory /etc/mysql does not exist
Error: /Stage[main]/Mysql::Server::Config/File[/etc/mysql/conf.d]/ensure: change from absent to directory failed: Cannot create /etc/mysql/conf.d; parent directory /etc/mysql does not exist
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/mysql/my.cnf20160413-2395-1uo3ffj.lock at 39:/etc/puppetlabs/code/modules/mysql/manifests/server/config.pp
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/mysql/my.cnf20160413-2395-1uo3ffj.lock at 39:/etc/puppetlabs/code/modules/mysql/manifests/server/config.pp
Wrapped exception:
No such file or directory @ dir_s_rmdir - /etc/mysql/my.cnf20160413-2395-1uo3ffj.lock
Error: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/mysql/my.cnf20160413-2395-1uo3ffj.lock at 39:/etc/puppetlabs/code/modules/mysql/manifests/server/config.pp
2016-04-13 14:39:22 +01:00
Hunter Haugen
67ea1c4dd3 (MODULES-1256) Fix parameters on OpenSUSE 12 2016-04-11 14:49:18 -07:00
Igor Galić
b41dc6f4b3 Merge pull request #813 from tomkrouper/config-before-install
Config before install
2016-03-29 16:16:11 +02:00
Hunter Haugen
d8206aa4ec Allow mysql::backup::mysqldump to access root_group in tests 2016-03-25 15:31:15 -07:00
Tom Krouper
8b366fe7df Move config install before package install
This prevents mysqld from running without its intended configuration.
2016-03-25 09:01:31 -07:00
Maksim Malchuk
61619f69fc Use mysql_install_db only with uniq defaults-extra-file
Executing mysql_install_db with the defaults-extra-file set to the
global option file can produce errors with duplicates. For example it
happens when 'ignore-db-dir' option passed to $override_options in
mysql::server class. Same as https://bugs.mysql.com/bug.php?id=69441
2016-03-11 22:24:55 +03:00
Thomas Cadeau
b33f9c663e Move all dependencies to not have them in case of service unmanaged 2016-01-07 19:40:19 +01:00
Igor Galić
5e7b999615 Merge pull request #784 from vicinus/master
ensure if service restart to wait till mysql is up
2015-12-21 12:52:04 +01:00
Vicinus, Reinhard
3a49209a6f ensure if service restart to wait till mysql is up 2015-12-19 20:43:49 +01:00
Igor Galić
45419fde6d Merge pull request #787 from obi11235/master
Fixing error when disabling service management and the service does not exist
2015-12-15 17:28:09 +01:00
David Schmitt
c353259fd9 Merge pull request #769 from gabriel403/master
Ubuntu vivid should use systemd not upstart
2015-12-15 16:18:58 +00:00
Gabriel Baker
681d4f856f Ubuntu vivid should use systemd not upstart 2015-12-15 15:38:18 +00:00
Paul
3a29c5e552 Fixing error when disabling service management and the service does not exist 2015-12-14 16:52:37 -05: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
Tim McLaughlin
3a6a6c6358 Checking major release instead of specific release per @cmurphy. 2015-11-13 11:04:57 -08:00
Tim McLaughlin
47c1eb7386 Merging with upstream changes from https://github.com/puppetlabs/puppetlabs-mysql.git 2015-11-13 10:48:49 -08:00
Bryan Jen
9d9c78fc71 Merge pull request #773 from liaoishere/bug
(MODULES-2787) Fixes for future parser
2015-11-05 16:27:15 -07:00
Liao Penghui
3694ae2a80 (MODULES-2787) Fixes for future parser
The weekday attribute of cron resource will be parse to negetive integer
with future parser. This patch is aim to ensure that the value types of
cron resouce are valid with future parser.
2015-11-05 00:11:15 +08: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
ad204cb622 (MODULES-2490) correct the daemon_dev_package_name for mariadb on redhat 2015-10-12 17:59:06 +01:00
Igor Galić
c17c46552b Merge pull request #751 from mcanevet/patch-1
Fix when not managing config file
2015-09-22 15:07:27 +02: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
Morgan Haskel
3e8e0320cf Compatibility with PE 3.3
Add workarounds to ENTERPRISE-258 and update metadata accordingly.
2015-08-31 14:49:24 -07:00
Christoph Fiehe
ff4ce8c5d4 Fixes improper use of function 'warn' in backup manifest of server.
Have a look to the following sites:
https://ask.puppetlabs.com/question/13288/whats-the-difference-between-warn-and-warning/
https://docs.puppetlabs.com/puppet/latest/reference/lang_conditional.html?_ga=1.41504802.1433359326.1439356343
2015-08-12 07:30:42 +02:00
Hunter Haugen
603a02d118 (PUP-5021) depend on package title, not name 2015-08-10 14:03:49 -07: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
Michael Chapman
0dffab2923 Fix show_diff already set on .my.cnf
show_diff is set twice on .my.cnf causing compilation error:

Parameter 'show_diff' is already set on File[/.my.cnf]

This patch removes one of them
2015-08-05 15:03:45 +10: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
Bryan Jen
f0a064aebd Merge pull request #739 from hunner/dont_print_root
Dont print root
2015-08-03 15:01:18 -07:00
Lars Kellogg-Stedman
23a4a362a0 [#puppethack] use of mysql::db without mysql::server
This removes the hard dependencies on mysql::server from
manifests/db.pp. This permits one to use this module to manage databases
in an existing server, possibly located on a remote host (with a
properly configured /root/.my.cnf).
2015-07-30 15:53:24 +02:00
TP Honey
f9359624f0 Merge pull request #732 from DavidS/dont_print_root
(maint) don't print diff root password in diff
2015-07-14 12:16:00 +01:00
tphoney
8f628b8d73 (maint) don't print diff root password in diff
For puppet versions that support it, suppress diffing root's password.
2015-07-14 11:52:34 +01:00
tphoney
d2b33b5af2 dont print diff root password in diff
puppet 2.7 doesnt support show_diff

hash alignment
2015-06-29 16:43:35 +01:00
Drew Fisher
aba6280a49 Add Solaris support to MySQL module 2015-06-25 09:33:56 -06:00
Timo Goebel
7ea4a748c2 fix Evaluation Error with future parser 2015-06-23 19:04:39 +02:00
Travis Fields
ac6ae7140e (maint) Package was renamed in server::install
- As a result of rename several underlying dependencies broke
  this is to update the require dependencies
2015-06-18 13:55:22 -07:00
Yanis Guenane
29788fb4c4 (MODULES-2077) Fixes wrong dependency variable
Currently the package dependency relies on the service name when it
should be relying on the package name.
2015-05-27 17:05:38 +02:00
Zachary Dovel
4bab65edcb Fixed server package name so it isn't hardcoded to mysql 2015-05-27 13:27:17 +02:00
Seth Lyons
dc9dcee4fe update to proper defaults for freebsd 2015-05-12 15:26:50 -04:00
Travis Fields
d3901f205a (fix) - Change default for mysql::server::backup to ignore_triggers => false
- Update spec acceptance test to check for which version is currently installed prior to testing
2015-05-12 09:45:10 -07:00
Travis Fields
9dad94a8c6 (fix) - Fix issue where fact is unknown at start
- Resolve issue where if known and failed versioncmp would result in idempotency issue on second run
2015-05-11 09:36:35 -07:00
Travis Fields
8b1fa24479 (fix) - Fix an issue were we assume triggers work
- There are older versions of mysql that do not support the privilege TRIGGER and need to change default to not include
  http://dev.mysql.com/doc/refman/5.0/en/grant.html
  'MySQL does not support the standard SQL UNDER privilege, and does not support the TRIGGER privilege until MySQL 5.1.6'

- Updated tests to have both 5.1.6 and 5.0.11 tests for mysql_version fact
2015-05-08 08:51:38 -07:00
Morgan Haskel
e4b4afd000 Merge pull request #683 from eems-leo/remove-old-root-pass
Remove references to old_root_password (cleanup)
2015-05-05 12:10:56 -07:00