Commit graph

819 commits

Author SHA1 Message Date
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
Ashley Penney
5b10f3e773 Clean these up to be more readable. 2014-08-08 16:47:44 -04:00
Ashley Penney
00a191f9ed Convert specs to RSpec 2.99.1 syntax with Transpec
This conversion is done by Transpec 2.3.6 with the following command:
    transpec -f -c "bundle exec rake spec"

* 69 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 48 conversions
    from: obj.should
      to: expect(obj).to

* 34 conversions
    from: == expected
      to: eq(expected)

* 4 conversions
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

* 3 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 2 conversions
    from: lambda { }.should
      to: expect { }.to

* 2 conversions
    from: pending
      to: skip

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-08-08 16:47:44 -04:00
Ashley Penney
314dc1ff9e Merge pull request #553 from apenney/remove-deprecated
Remove all the deprecated code.
2014-08-08 14:30:40 -04:00
Ashley Penney
bb205ad2f0 Remove all the deprecated code. 2014-08-08 14:13:22 -04:00
Morgan Haskel
c70fc13fc1 Merge pull request #552 from apenney/improve-graceful-failures
Handle graceful failure on RHEL4 and improve the messaging.
2014-08-08 12:27:26 -04:00
Ashley Penney
cf2ffc6821 Handle graceful failure on RHEL4 and improve the messaging. 2014-08-08 11:55:31 -04:00
Ashley Penney
5b10653882 Merge pull request #551 from apenney/fix-acceptance-tests
Fix acceptance/unit tests
2014-08-07 18:08:51 -04:00
Ashley Penney
138820b3b8 Don't check the variable here, we can trust mysql to work. 2014-08-07 17:53:26 -04: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
Ashley Penney
994ac1a058 Rebuild the acceptance tests. 2014-08-07 15:52:19 -04:00
Ashley Penney
574d5d9dff Merge pull request #550 from apenney/merge-23
Merge 23
2014-08-07 15:51:43 -04:00
Ashley Penney
32393b6099 Merge branch '2.3.x' 2014-08-07 15:50:56 -04:00
Ashley Penney
bbc7f2b33e Merge pull request #517 from edvinasme/archlinux_support
Add Archlinux support
2014-07-24 13:22:07 -04:00
Ashley Penney
1eed53f328 Merge pull request #545 from rsauvatinet/master
Update mysqltuner.pl to version 1.3.0
2014-07-24 13:15:07 -04:00
I'm on Vacation until 18th of July
94e488fd3e Merge pull request #547 from rayl/master
Prevent ERROR 1008 in mysql_database provider
2014-07-24 12:14:41 +02:00
Ray Lehtiniemi
548952a6f9 Prevent ERROR 1008 in mysql_database provider
Check for database existence when dropping to prevent

  ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist

Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
2014-07-23 21:41:16 -06: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
2c463fc02e Merge pull request #540 from jsosic/patch-1
Fix problem with GRANT not recognizing backslash
2014-07-23 12:37:59 +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
I'm on Vacation until 18th of July
70e21202a9 Merge pull request #546 from igalic/notify-correct
Make sure we actually notify the service.
2014-07-23 12:35:01 +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
Rémi Sauvat
833c8fce1b Update mysqltuner.pl to version 1.3.0 2014-07-22 16:05:17 +02:00
Hunter Haugen
2b21f69fca Merge pull request #544 from strider/AddsCentOS7Support
Adds Support for CentOS and Scientific Linux 7
2014-07-21 15:47:42 -07:00
Gael Chamoulaud
7b3cdd234a Adds Support for CentOS and Scientific Linux 7
CentOS Project has adopted a new rule for versioning numbers. The major number
matches the RHEL major number, but the minor number is generated from the
release date. For example, CentOS 7.0.1406.

Uses $::operatingsystemmajrelease instead of $::operatingsystemrelease for
avoiding issue like "Comparison of String with 7 failed" for CentOS 7.

Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2014-07-21 20:13:26 +02:00
Travis Fields
c0f4372df0 Merge pull request #541 from apenney/231-release
Prepare a 2.3.1 release.
2014-07-15 09:18:03 -07:00
Ashley Penney
335f172698 Prepare a 2.3.1 release. 2014-07-15 11:31:12 -04:00
jsosic
356672342e Fix problem with GRANT not recognizing backslash
If database grant has backslash in database name (for example: example\_dev), then puppet will try to apply same resource every run because MySQL reports that table name with double backslash (for example: example\\_dev). By global replace of double backslash with single one, this issue is fixed.
2014-07-13 04:01:53 +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
Edvinas Klovas
0f0d2e6815 Add Archlinux support
This commit adds Arch Linux support. Everything besides bindings for JAVA and
Ruby has been tested as properly working. JAVA and Ruby bindings cannot be
managed by puppet as official packages are not in official repositories but in
AUR instead. PHP bindings are installed by default with mysql/mariadb package so
there is no need to specify/install separate patches. To reflect this,
bindings.pp has been altered to throw a warning if user wants to install
PHP binding. It throws an error is user tries to install JAVA or Ruby binding.

Signed-off-by: Edvinas Klovas <edvinas@pnd.io>
2014-07-10 21:55:44 +02:00
Hunter Haugen
c6acbf5a53 Merge pull request #538 from laurenrother/master
Update TOC for accuracy
2014-07-10 10:56:53 -07:00
Lauren Rother
d4f7ff2599 Update TOC for accuracy 2014-07-10 10:54:35 -07:00