Commit graph

884 commits

Author SHA1 Message Date
Justin Stoller
f0f5f64723 Update for using Geppetto plugin in CI 2014-12-02 11:37:42 -08:00
Morgan Haskel
f235f34cab Merge pull request #611 from cmurphy/sles12
Fix operating system release fact for SLES
2014-11-26 18:27:14 -05:00
Colleen Murphy
e23da83230 Fix operating system release fact for SLES
PE on SLES 11 does not support the operatingsystemmajrelease fact.
2014-11-26 15:25:37 -08:00
Travis Fields
137d0dba0e Merge pull request #610 from cmurphy/sles12
Fix support for SLES 12
2014-11-26 16:08:08 -05:00
Colleen Murphy
25b65342b3 Add support for SLES 12
SLES 12 has different package names for the server and client. It also
doesn't seem to want to start if basedir is defined.
2014-11-26 12:57:44 -08:00
Colleen Murphy
e0e797e480 Revert "Default to MariaDB for SLES 12"
SLES belongs in the Suse family, not the RedHat family.

This reverts commit 8cc0083d6e.
2014-11-26 12:11:46 -08:00
Travis Fields
510dfda002 Merge pull request #607 from laurenrother/summary
Add metadata summary per FM-1523
2014-11-21 16:05:19 -05:00
Hunter Haugen
5a0ad6d0df Merge pull request #608 from cyberious/SLES12
Default to MariaDB for SLES 12
2014-11-21 12:53:13 -08:00
Travis Fields
8cc0083d6e Default to MariaDB for SLES 12 2014-11-21 15:07:50 -05:00
Igor Galić
790305b2c4 Merge pull request #606 from michaeltchapman/usernameregex
Support size 15 and 16 quoted usernames
2014-11-21 09:54:59 +01:00
Lauren Rother
cfec01f3a3 Add metadata summary per FM-1523 2014-11-20 15:37:52 -08:00
Michael Chapman
fe0365e80d Support size 15 and 16 quoted usernames
As usernames containing special characters must be quoted, they
may have two extra characters that are not counted against the
size limit of 16 characters. This patch adds a regex to handle
this case.
2014-11-20 17:23:11 +11:00
Colleen Murphy
31191b64b7 Merge pull request #604 from mhaskel/rebase_581
Fixed test classes
2014-11-19 10:24:25 -08:00
Hunter Haugen
b7feb9503f Merge pull request #605 from slamont/master
Proper containment for mysql::client in mysql::db
2014-11-18 14:54:50 -08:00
Sylvain Lamontagne
3b5d5af855 Proper containment for mysql::client in mysql::db 2014-11-18 17:33:18 -05:00
Andrea Biancini
473a3c3307 Fixed test classes
Oracle 7 uses mariadb

Update PE and OS compatibility info in metadata

Now compatible with PE 3.4 and SLES 10.

Clean up metadata for new SLES support

Add timeout parameter to increase for long time running sql imports

Signed-off-by: refnode <refnode@gmail.com>

Add documentation for new mysql::db "import_timeout" parameter

Signed-off-by: refnode <refnode@gmail.com>

Add support for Gentoo

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 '?').

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.

(maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template

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.)

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 \.

Fixed backup test

Oracle 7 uses mariadb

Update PE and OS compatibility info in metadata

Now compatible with PE 3.4 and SLES 10.

Add timeout parameter to increase for long time running sql imports

Signed-off-by: refnode <refnode@gmail.com>

Add documentation for new mysql::db "import_timeout" parameter

Signed-off-by: refnode <refnode@gmail.com>

Add support for Gentoo

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 '?').

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.

(maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template

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.)

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-18 16:27:57 -05:00
Hunter Haugen
18265e0d4c Merge pull request #603 from mhaskel/mysql_test_fixes
Fix test issues
2014-11-14 13:59:42 -08:00
Morgan Haskel
11fb01c736 Fix test issues
Remove the dependency on stdlib 4.x puppetlabs/puppetlabs-mysql#574
introduced, add some input validation, and improve test checks.
2014-11-14 13:16:01 -08:00
Igor Galić
ab84a671f9 Merge pull request #574 from Mylezeem/allow_multiple_import_at_a_time
(MODULES-1338) Allow mysql::db to import several files
2014-11-14 17:15:13 +01:00
Igor Galić
22b07aef6f Merge pull request #602 from theasci/fix-user-validation-regression
Fix regression in username validation
2014-11-14 17:13:46 +01:00
Mason Malone
4f0d4311d9 Fix regression in username validation
Commit cdd7132ff9 added logic to catch invalid database usernames,
but the regex it uses fails to match usernames with special characters that are properly quoted,
causing errors with usernames that used to work in versions < 3.0.0. This fixes the regex so that
if the username is quoted, anything is allowed between the quotes.

From the docs (http://dev.mysql.com/doc/refman/5.5/en/identifiers.html):
"Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP),
except U+0000"
2014-11-13 18:18:02 -05:00
Yanis Guenane
5e6a1c418a (MODULES-1338) Allow mysql::db to import several files
A user might need to import several files on database creation.
Currently the module only allows the import of a single file.
This commit allows one to, from now on, import severals.

Before :

  mysql::db { 'test' :
    sql => '/tmp/my_import1.sql',
  }

Now :

  mysql::db { 'test' :
    sql => [
      '/tmp/my_import1.sql',
      '/tmp/my_import2.sql',
    ]
  }
2014-11-13 14:17:50 -05:00
Travis Fields
89762a7d0c Merge pull request #601 from mhaskel/merge_3.0.x
Merge 3.0.x
2014-11-12 09:58:30 -08: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
Morgan Haskel
b06d3fe55d Merge remote-tracking branch 'upstream/3.0.x' into merge_3.0.x 2014-11-11 17:23:14 -08:00
Nick Le Mouton
08a66b7bb9 Added log-bin dir creatation 2014-11-12 06:50:14 +13:00
Igor Galić
ad709afd2c Merge pull request #591 from damonconway/MODULES-1484
[MODULES-1484] Add support for install_options for all package resources...
2014-11-11 14:39:14 +01:00
Morgan Haskel
810ceb1815 Merge pull request #600 from hunner/release_3.0.0
Release 3.0.0
2014-11-10 16:23:59 -08:00
Hunter Haugen
46c53dbbd7 clarify changelog for major release 2014-11-10 16:21:21 -08:00
Travis Fields
c5c1b3840e Prepare for 3.0.0 release 2014-11-10 16:21:21 -08:00
Travis Fields
e5a300a2d2 Merge pull request #599 from mhaskel/metadata_fix
Fix issues URL and make format match puppet module build
2014-11-10 16:10:38 -08:00
Morgan Haskel
67bae9f58c Fix issues URL and make format match puppet module build 2014-11-10 16:08:40 -08:00
Travis Fields
45b4f4b3e2 Merge pull request #598 from mhaskel/fix_for_beaker_with_1.8.7
Prior to this there was generic :test group.
2014-11-10 14:56:37 -08:00
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
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
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