Commit graph

93 commits

Author SHA1 Message Date
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
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
Morgan Haskel
c1191f1230 PR 654 was incorrectly using stdlib dirname
puppetlabs-mysql has a dependency on stdlib 3.2.0, which does not
include the dirname function.
2015-02-24 11:08:29 -08:00
Igor Galić
e323f69c04 Merge pull request #654 from NoodlesNZ/logbindir
Check for full path for log-bin to stop puppet from managing directory “."
2015-02-24 08:49:11 +01:00
Travis Fields
51d66a53ab Fix lint issues due to merging of PR #649 2015-02-19 10:55:24 -08:00
Igor Galić
cb142f414d Merge pull request #649 from dveeden/newbackupprovider
Use backup providers
2015-02-19 16:06:42 +01:00
David Gurtner
b3c33f0a13 fix bug in GH-578
the recently added feature to support galera by allowing independent
creation of the root@localhost user in the DB and the /root/.my.cnf
file contains a bug.

specifically the .my.cnf file resource still requires the root@localhost
resource, even when it is not available.

this fixes the issue by making the dependency conditional.
2015-02-16 17:01:18 +01:00
Tim Mooney
24eca014b8 Only set up ordering between the config file and the service if we're
managing the config file.
2015-02-12 12:37:37 -06:00
juniorsysadmin
f5a693b826 (MODULES-1143) Add package_manage parameter
This patch adds a package_manage parameter for both mysql::server and
mysql::client
2015-02-12 13:33:36 +11:00
Daniël van Eeden
58508b772a Use backup providers
Add MySQL Enterprise Backup and Percona XtraBackup
2015-02-11 22:27:35 +01:00
Nick Le Mouton
dc711561d7 Check for full path for log-bin to stop puppet from managing directory “.” 2015-02-12 08:19:54 +11:00
Morgan Haskel
2635469f0b lint cleanup 2015-02-09 15:30:55 -08:00
Morgan Haskel
b9fbba3b0d Merge pull request #578 from franzs/new_root_options
Add new parameters create_root_user and create_root_my_cnf.
2015-02-09 14:13:07 -08:00
Morgan Haskel
96f4d164a4 MODULES-1759: Remove dependency on stdlib >=4.1.0
Backported dirname => mysql_dirname since updating dependency to stdlib
4.1.0 is backwards incompatible with some versions of PE.
2015-02-09 12:34:44 -08:00
Rob Nelson
e08aa011f1 (MODULES-1731) Invalid parameter 'provider' removed from mysql_user instance. 2015-01-30 12:49:20 +00:00
TP Honey
1a87bae020 Merge pull request #637 from dveeden/account_localhost
Do the right thing when fqdn==localhost
2015-01-22 10:36:01 -08:00
Daniël van Eeden
c04fed1066 When fqdn==localhost account security breaks
This is because the root@localhost account is already
defined.

Remove localdomain accounts if fqdn is localhost
2015-01-18 15:02:17 +01:00
juniorsysadmin
2088fb8b36 Fix lint warning in server/service.pp 2015-01-11 15:35:10 +11:00
Igor Galić
d3f7254ecc Merge pull request #616 from takumin/install_db_with_freebsd
mysql_install_db freebsd support
2014-12-23 18:03:25 +01:00
Igor Galić
5f62e6d455 Merge pull request #615 from KlavsKlavsen/master
ensure mysql-config-file and server package is in place before trying to...
2014-12-22 10:32:35 +01:00
Morgan Haskel
a367b3e1e4 Clean up lint warnings 2014-12-16 11:19:04 -08:00
Morgan Haskel
3c872abcd2 Remove mysqltuner, fetch with staging instead
mysqltuner is licensed under GPL so we don't want to package it with the
module.
2014-12-16 10:52:39 -08:00
takumi
7d3962fc28 mysql_install_db freebsd support 2014-12-05 18:45:38 +09:00
Klavs Klavsen
a8fd4d375b ensure mysql-config-file and server package is in place before trying to start service - to ensure it gets started with correct settings and does not try to enable service before it actually exists :) 2014-12-04 16:14:09 +01:00
Igor Galić
56e52fc3fa Merge pull request #596 from NoodlesNZ/logbindir
Create log-bin directory if it doesn't exist
2014-11-12 15:39:02 +01:00
Nick Le Mouton
08a66b7bb9 Added log-bin dir creatation 2014-11-12 06:50:14 +13:00
Damon Conway
7de2316e15 [MODULES-1484] Add support for install_options for all package resources.
Add install_options parameter to mysql::bindings, mysql::client, and
mysql::server. The default is undef.
2014-11-08 00:30:00 -06:00
Colleen Murphy
ec6b97ea5d Ensure error log is present before trying to manage ownership
If mysql generates an error log in between puppet runs, the log's
ownership and group might not match the ownership and group set by the
file resource. This means sequential puppet runs will appear not to be
idempotent. This patch makes sure the file is there from the start so
that it doesn't have to change its ownership later.
2014-10-07 14:28:00 -07:00
Franz Schwartau
02564bfe08 Add new parameters create_root_user and create_root_my_cnf.
This allows the galera module and others to write ${::root_home}/.my.cnf
independently from create the mysql user. This is useful for cluster
setups where you want to create ${::root_home}/.my.cnf on every node
but create the user only once.
2014-10-06 10:53:30 +02:00
Martin Magr
293d35db4d Fixes manage_service feature
Module lacks of disabling service managing (ensure=>undef).
This patch is fixing this issue.
2014-08-21 17:44:27 +02:00
Hunter Haugen
1812fbca25 Rewrite some of the unit tests to work on more platforms.
This commit introduces puppet_facts, a gem that allows easier testing
against PE platforms.  We're using this gem to automatically parse the
metadata.json and test against appropriate versions of PE on platforms
we support.

We start by only running against centos-6-x86_64 and ubuntu 14.04 on a
regular basis but this is implemented as an ENV so it can be overwritten
by CI systems to test against all PE platforms.
2014-08-07 16:27:17 -04:00
I'm on Vacation until 18th of July
70cafdc283 Merge pull request #509 from xbezdick/master
Parametrize !includedir
2014-07-23 12:38:18 +02:00
I'm on Vacation until 18th of July
46643523ce Merge pull request #539 from stevesaliman/master
Grants for the backupuser should be conditional
2014-07-23 12:35:50 +02:00
Igor Galić
ea0b1fe442 Make sure we actually notify the service.
fix for the fix in c2d02ff721
thanks to @edestecd
2014-07-23 12:03:00 +02:00
Steve Saliman
30249552d4 Changed the backup user grant in backup.pp to use the ensure variable instead of always assuming 'present' 2014-07-11 11:25:10 -06:00
Ashley Penney
c2d02ff721 Make sure we notify the service. 2014-07-08 13:24:23 -04:00
Ashley Penney
5959715ff6 Rework the mysql initdb functionality.
This reworks a previously unmerged PR to clean up the code a little and
adds a test for it.
2014-07-08 12:53:20 -04:00
Reinhard Vicinus
6f5488827a run mysql_install_db if datadir is set annd mysql database is missing 2014-07-08 10:26:18 -04:00