Commit graph

850 commits

Author SHA1 Message Date
Morgan Haskel
0aee5c94d2 Prior to this there was generic :test group.
Unfortunately Beaker will be EOL-ing support for Ruby 1.8 (a number of
Beaker's dependencies already have and pinning to older versions is
becoming costly). Once Beaker does this it will cause failures whenever
running `bundle install`.

To avoid this failure we can segregate the system testing gems, allowing
unit, lint and development to continue with
`bundle install --without system_tests.`
2014-11-10 14:54:36 -08:00
Igor Galić
8dd37aea3a Merge pull request #594 from skroll/escape_backslash
Fix escaped backslashes in grants
2014-11-07 15:23:52 +01:00
Igor Galić
1494412f88 Merge pull request #588 from maxenced/fix-mysql-user-allowed-char
Improve checks for MySQL user's name.
2014-11-07 15:23:23 +01:00
Maxence Dunnewind
cdd7132ff9 Improve checks for MySQL user's name.
As per http://dev.mysql.com/doc/refman/5.5/en/identifiers.html , MySQL
allows for more than '\w-'. This commit improves the check to ensure
that:
 - if username only contains [0-9a-zA-Z$_], it might be quoted. It is
   not a requirement though
 - if username contains anything else, it MUST be quoted

I kept 2 checks, but the 2nd one can probably be removed (I can't find a
username which match the 2nd one but not the first.)
2014-11-06 08:51:07 +01:00
Igor Galić
d9e5c95461 Merge pull request #593 from vinzent/small_maint
(maint) add statement "MANAGED BY PUPPET" to my.cnf config file template
2014-11-06 08:20:28 +01:00
Scott Kroll
9dbdd89c7a Fix escaped backslashes in grants
* Mysql uses the underscore character to represent a single character
  wildcard.
* A grant on table `the_database`.* would match `theAdatabase`.*, so
  underscores must be escaped to avoid this match.
* The output from mysql escapes special characters (\n, \t, \0, and \\),
  but the input does not need to be escaped.
* In order for the provider to compare the tables, the output of
  mysql -NBe <query> must have \\ substituted with \.
2014-11-05 14:53:14 -05:00
Thomas Mueller
5d732bda6c (maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template 2014-11-05 10:13:39 +01:00
Igor Galić
40dd180588 Merge pull request #571 from jtopper/master
[MODULES-1333] Add explicit dependencies for mysql_database and mysql_user types
2014-10-28 16:14:59 +01:00
Igor Galić
8540e26ff4 Merge pull request #587 from maxenced/fix-mysql-grant-parsing
The old regex requires something after the 'host' part. Fix this.
2014-10-28 14:42:46 +01:00
Maxence Dunnewind
46065c4095 The old regex requires something after the 'host' part. Fix this.
Old regex is : /^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/ . The
last part (\s.*)$ means "a space followed by anything". The issue is
that when user has no GRANT privileges, the "SHOW GRANTS FOR #{user_string}" returns
"GRANT SELECT ON `database`.* TO 'user'@'%'" which does not match (\s.*)$ .
This small patch fixes this making last bloc optional (thanks to '?').
2014-10-27 16:41:33 +01:00
Igor Galić
d45c1e4822 Merge pull request #585 from stepping-stone/gentoo
Add support for Gentoo
2014-10-27 16:39:12 +01:00
Pascal Jufer
2a91e524bd Add support for Gentoo 2014-10-22 15:12:18 +02:00
Igor Galić
39aa5f511a Merge pull request #576 from igalic/timeout
Timeout
2014-10-19 19:17:52 +02:00
Hunter Haugen
39d75988bc Merge pull request #584 from cmurphy/clean_metadata
Clean up metadata for new SLES support
2014-10-14 10:07:55 -07:00
Colleen Murphy
9f3e522bbf Clean up metadata for new SLES support 2014-10-14 10:05:56 -07:00
Hunter Haugen
53f5ad4881 Merge pull request #583 from cmurphy/metadata
Update PE and OS compatibility info in metadata
2014-10-14 10:01:19 -07:00
Colleen Murphy
fef9602dcf Update PE and OS compatibility info in metadata
Now compatible with PE 3.4 and SLES 10.
2014-10-14 09:58:57 -07:00
Morgan Haskel
c6f894545d Merge pull request #582 from cmurphy/fix_oracle
Oracle 7 uses mariadb
2014-10-10 16:32:23 -04:00
Colleen Murphy
d2d40a8dc8 Oracle 7 uses mariadb 2014-10-10 13:23:48 -07:00
Morgan Haskel
91e57102d6 Merge pull request #580 from cmurphy/fix_bzcat
Install bzip2 on RHEL 7 and Fedora hosts
2014-10-07 18:52:11 -04:00
Colleen Murphy
c291be44eb Install bzip2 on RHEL 7 and Fedora hosts
The backup script needs the bzcat command, which does not come
installed on RHEL 7 and Fedora hosts by default. This patch installs
the bzip2 package before attempting to run tests that use bzcat.
2014-10-07 15:43:57 -07:00
Morgan Haskel
1a3f91f12d Merge pull request #579 from cmurphy/fix_log_idempotency
Ensure error log is present before trying to manage ownership
2014-10-07 17:34:15 -04: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
Igor Galić
400d3b29cf Merge pull request #570 from fnerdwq/mysql_grant_column_privs
(MODULES-552) Add capability to specify column_privileges
2014-10-07 15:46:08 +02:00
Frederik Wagner
f88719b52f (MODULES-552) Add capability to specify column_privileges 2014-10-06 08:11:01 +02:00
Morgan Haskel
e6dceb13da Merge pull request #577 from cmurphy/fix_future_errors
Change sql param to default to undef instead of empty string
2014-10-03 17:26:25 -04:00
Colleen Murphy
bf2c8d4bc0 Change sql param to default to undef instead of empty string
The future parser treats the empty string '' as a truthy value. This
means that mysql::db will always try to include the db import exec in
the catalog. With the empty string as the $sql value, the command
attempts to import '' into a database, which fails. This patch changes
the default $sql value to undef so that the exec won't be included if
there is no sql to import.
2014-10-03 11:56:18 -07:00
refnode
16d2df2cb9 Add documentation for new mysql::db "import_timeout" parameter
Signed-off-by: refnode <refnode@gmail.com>
2014-09-29 17:43:29 +02:00
refnode
4e1bb8f1ce Add timeout parameter to increase for long time running sql imports
Signed-off-by: refnode <refnode@gmail.com>
2014-09-29 17:42:30 +02:00
Morgan Haskel
b338635919 Merge pull request #573 from mhaskel/fix_187_unittests
Trailing commas were breaking things on 1.8.7
2014-09-19 10:09:26 -07:00
Morgan Haskel
ba4830cbbe Trailing commas were breaking things on 1.8.7 2014-09-19 09:42:35 -07:00
Jon Topper
c4d45c3eb5 Add explicit dependencies for types
mysql_grant has an autorequire()'d dependency on the .my.cnf file used
by the provider to talk to the database.

I've added this to mysql_database and mysql_user too since logically
these also need the file to be in place.

I've hit this bug because of a slightly unusual edge case in our own
manifests, but I think this fix belongs upstream regardless.
2014-09-16 15:46:13 +01:00
Igor Galić
1bd8f567fa Merge pull request #568 from edestecd/master
future parser converts explicit undef to empty string
2014-09-16 15:08:22 +02:00
Igor Galić
443ff061ea Merge pull request #569 from fnerdwq/mysql_grant_revokation
(MODULES-1330) Change order of revokation.
2014-09-16 15:02:13 +02:00
Frederik Wagner
bbbc6cd446 (MODULES-1330) Change order of revokation 2014-09-16 14:06:26 +02:00
Igor Galić
86c7fcf28e Merge pull request #565 from mmonaco/master
mysql_database: prevent syntax error with collate=>'binary'
2014-09-16 13:34:44 +02:00
Matthew Monaco
d986a87558 mysql_database: prevent syntax error with collate=>'binary'
On MySQL v5.5.38, creating a database such as:

	CREATE DATABASE `mydb` CHARACTER SET binary COLLATE binary;

seems to hit a parser bug. A workaround is simply to quote COLLATE
`binary`. As the quoting is harmless, and for aesthetics, quote both
the CHARACTER SET and COLLATE arguments.
2014-09-15 23:22:59 -06:00
Chris Edester
fa968542e0 future parser converts explicit undef to empty string
With the future parser and puppet 4, explicit undef seems to be converted to blank string for erb templates
This change allows you to continue to omit config options in the main my.cnf
2014-09-15 13:10:17 -04:00
Igor Galić
fbef97d613 Merge pull request #558 from paramite/manage_service
Fixes manage_service feature
2014-09-10 15:53:35 +02:00
Igor Galić
f8dca35b8e Merge pull request #559 from nhinds/file_per_database_username_and_password
(MODULES-1287) Pass the backup credentials to 'SHOW DATABASES'
2014-09-08 14:54:17 +02:00
Ashley Penney
4890ddb2f0 Merge pull request #561 from mhaskel/spec_updates
Update spec_helper for more consistency
2014-08-28 17:51:25 -04:00
Morgan Haskel
058053b5bc Update spec_helper for more consistency 2014-08-28 17:49:18 -04:00
Nicholas Hinds
462dbf7a1c (MODULES-1287) Pass the backup credentials to 'SHOW DATABASES'
Pass the backup username and password to mysql when running SHOW DATABASES in
mysqlbackup.sh if `file_per_database` is true and `backupdatabases` is empty.
2014-08-24 15:44:47 +12: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
Ashley Penney
a3bfe5519d Merge pull request #556 from apenney/unit-test-changes
Split out the template tests and rework both sets of tests.
2014-08-14 15:23:13 -04:00
Ashley Penney
9cb685da47 Split out the template tests and rework both sets of tests. 2014-08-14 14:55:20 -04:00
Igor Galić
51162faf2e Merge pull request #555 from jonmosco/documentation_php
added mysql::bindings::php to the README.md
2014-08-14 12:00:43 +02:00
Jon Mosco
f1c1e7b7d2 added mysql::bindings::php to the README.md 2014-08-13 13:02:14 -04:00
Ashley Penney
d564793bd1 Merge pull request #554 from apenney/unit-test-changes
Unit test changes
2014-08-08 18:27:54 -04:00
Ashley Penney
c4e4a56a47 Fix this to be more concise and consistent.
This was a surprisingly large amount of work.
2014-08-08 16:47:45 -04:00