When I tried to use database_grant, I assumed the privilege
names would match the SQL GRANT command, for example, SELECT
or CREATE TEMPORARY TABLES. But in fact the privilege names
are taken from columns of the mysql.db table. As a result,
a row was created in mysqld.db, but none of the privileges
I intended to grant were actually granted.
Someone else filed a ticket with the same issue:
http://projects.puppetlabs.com/issues/15808
Document that how to specify individual privileges in
README.md.
Some characters used in a password can cause the shell in an exec to do
unexpected things unless the password is enclosed in single quotes.
Updated the rspec tests to deal with the password quoting.
The mysql database_grant provider currently has what is arguably a heinous
design flaw. At present:
1. The 'privileges' parameter for the database_grant type, mysql provider,
does not expect the same syntax as the mysql Grant command ('SELECT',
'UPDATE', 'DELETE', etc). Rather, it expects the user to supply column
names used to store raw grants in the mysql.db or mysql.user tables
internally ('Select_priv', 'Update_priv', 'Delete_priv', etc).
2. If a user supplies `privileges => [ 'SELECT', 'INSERT' ]` instead of
`privileges => [ 'Select_priv', 'Insert_priv' ]`, the provider fails
silently and will continuously attempt to update the privileges with
each successive puppet run. In the specific example provided, all privs
for the user/db will be set to false since e.g. 'INSERT' does not match
any valid privilege.
Unfortunately it doesn't look simple to modify the provider such that the
intuitive SELECT, DELETE, etc. keywords can be used without changing
existing behavior. Leaving that alone for now, it *is* pretty simple to add
a validation function that will at least fail cleanly if non-functional
privilege values are supplied that don't mean anything to the provider. If
the user is trying to use valid MySQL Grant syntax, the new validation
procedure will recognize this and suggest a correction. Hopefully giving
users this kind of warning will clue them in to what kind of input the
provider expects.
This parameter can be used to specify whether the service
should be running.
It has been implemented to allow installations of mysql::server to
be in passive mode for HA.
* Add spec_full, spec_prep, and spec_clean targets
* Rename Gemfile -> .gemfile for less cluttered module packages
* Append fixtuers to modulepath instead of overwriting
* Use a more complete .gitignore
* Remove the recursive symlink