Commit graph

129 commits

Author SHA1 Message Date
Quentin Moss
86dbef4f5c
Fix syntax issue 2016-07-19 17:57:08 -07:00
Quentin Moss
9570b0342f
MODULES-3601 Move binary logging configuration to take place after package install 2016-07-19 17:45:18 -07: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
Raul Gonzalez
bff5bdfc7b Resource fails when fqdn is not set.
if server don't have domain name facter don't initialize fqdn and mysql_user resource fails with "...Invalid database user..." error.
2016-06-07 19:41:46 +02:00
Nemanja Delic
352d078ed5 moving mysqld.log resource to installdb.pp (#833) 2016-05-19 10:19:01 -07: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
d8206aa4ec Allow mysql::backup::mysqldump to access root_group in tests 2016-03-25 15:31:15 -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
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
David Schmitt
5f49c45b2e (MODULES-2683) fix version compare to properly suppress show_diff for root password 2015-10-13 11:29:53 +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
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
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
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
Steven C. Saliman
ec14b87a81 Added options for including/excluding triggers and routines, and fixed a permission problem that was preventing triggers from being backed up 2015-04-30 08:01:06 -06:00
Julien Pivotto
c2b0b4cb2c Split package installation and database install
The current install pattern used by this module is the following:
1. Install package
2. Install the DB
3. Make the config files

In some cases this prevents MySQL to start, because some variables in
the config file have an impact on the DB installation.

Example with a custom innodb_data_file_path:
[ERROR] InnoDB: space header page consists of zero bytes in data file
/var/lib/mysql/ibdata

This commit changes the order to do:
1. Install package
2. Make the config files
3. Install the DB
2015-04-23 13:17:08 +02:00
Dmitry Melanchenko
6a79d26838 references to README.md and default values were added to workaround warnings from puppet-lint 2015-04-15 21:25:37 +00:00
Morgan Haskel
298242e043 MODULES-1928 - allow log-error to be undef
Wrap the file resource so that this doesn't explode if log-error is
undef. This is required for syslogging.
2015-04-13 17:05:22 -07:00
Sebastian Reitenbach
5116883111 Fix regression introduced by adding OpenBSD support.
Add a $mysql_group parameter, and use that instead of the $root_group
parameter to define the group membership of the mysql error log file.
2015-03-18 08:47:25 +01:00
Jesse Cotton
a26b80d750 Remove default install root password if set 2015-03-17 15:21:07 +00:00
Marc Remy
04b806044a Manage service only if managed
In the case of an unmanaged mysql service, defined with:
class {'::mysql::server':
[...]
  service_manage => false,
[...]
}

We have the following error:
Undefined variable "service_ensure"

In this case, we don't want to have it "started" or "stopped", as it is
managed by another application (in our case by pacemaker).

This patch resolve this issue, by setting service_ensure to undef, in the
case of an unmanaged service.
2015-03-16 12:58:54 +01:00
Igor Galić
facb57a108 Merge pull request #567 from buzzdeee/master
Add OpenBSD support.
2015-03-12 10:55:17 +01:00
Igor Galić
32329b77b7 Merge pull request #672 from timmooney/master
Only set up ordering between the config file and the service if we're managing the config file.
2015-03-11 14:50:30 +01:00
Sebastian Reitenbach
db72fe8d86 Add OpenBSD support, only for OpenBSD -current, since
the recent switch to mariadb.
2015-03-11 14:46:29 +01:00
Morgan Haskel
7ee3b8b708 Whitespace fix 2015-03-02 11:27:56 -08:00
Morgan Haskel
7a3fe1ca00 Merge pull request #617 from juniorsysadmin/package-manage-parameter
(MODULES-1143) Add package_manage parameters
2015-02-27 12:06:25 -08:00
Hunter Haugen
ce43899af3 (MODULES-1804) Allow override of log-error
The mysqld log-error setting may be passed by override_options, but
server/service.pp was not using the overridden value. This fixes that.
2015-02-27 09:54:00 -08:00