This script could be used to sync backups to a central server, or just
to create a file to let external scripts know that backups are
(sucessfully) done and can be picked up.
The postscript option (defaults to false) and can be either a string or
an array of strings. These strings will be directly put into the
mysqlbackup.sh and as such can either be shell commands, or externally
managed files.
Some MySQL options need to be passed several times. For example :
http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-do-db
This is currently impossible with the override_options. This patch allows to
pass array as value. Example :
override_options => {
'client' => {
'password' => 'xxx',
},
'mysqld' => {
'bind_address' => '0.0.0.0',
'replicate-do-db' => ['base1', 'base2', 'base3'],
},
}
Which will be evaluated into :
[client]
password = xxx
[mysqld]
bind_address = 0.0.0.0
replicate-do-db = base1
replicate-do-db = base2
replicate-do-db = base3
This commit adds tests for the parameters that were previously untested.
Most of this testing is light, but all parameters of the module are now
called at least once. Generally we're testing the happy path, so these
need further work in future.
These tests are more or less parity with the rspec-system tests, though
dependent on a few patches that still have to make it into beaker and
beaker-rspec
Added "require" to the global mysql.rb file like in the other provider files.
defaults-file changed to defaults-extra-file in all the database_* (old) providers, the same as in the mysql_* providers.
Changed defaults-file to defaults-extra-file in all test files
This turned out to be a fairly bad idea. It begun as a way to try
and mirror what happens in the postgresql module for consistency
but instead made things complex.
I've changed it to have the override_options in mysql::server which
leads much more naturally out of the design and shape of MySQL.
This initial round of work focuses on adding the concept of
mysql::globals to the module. This is a shared place to provide all the
data the module needs, and then clients, servers, and providers can all
rely on this information to set things up.
This is being primarily used at first to allow a default_options hash
that contains all the previous parameters and takes a overrides_options
that allows you to then further customize any of the options in my.cnf.
This provider has undergone the largest set of changes and currently
just accepts a full SQL grant string as the name and then applies it,
making things easier for DBAs and removes the awkward attempts at
modelling grants into Puppet.
This work adds max_connections_per_hour, max_queries_per_hour, and
max_updates_per_hour support to the provider and extends self.instances to add
in the new parameters when checking existing users. It also adds
self.prefetch in order to speed up Puppet runs.
Provider is also switched to using mk_resource_methods to generate
all the resource readers, and exists? and other methods now use the
property_hash where appropriate.
Tests rewritten to handle changes and extend code coverage.