The following error occured:
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `INNODB_BUFFER_PAGE`': Access denied; you need (at least one of) the PROCESS privilege(s) for this operation (1227)
On Fedora-20+ and RHEL-7+ mysqld service does not work any more
and has been replaced by mariadb service. This patch changes all
parameters accordingly.
This will allow exported resource mysql::db to define same database but different
hostname and enables the cluster web nodes to declear the mysql::db and
to be collected on db node.
When defining the mysql::db as exported resources, there are chances that the
same resource names are defined across the site, which will cause puppet agent
fail. By adding an optional dbname parameter, default to the $name, it allows the
resouce name to be defined differently, e.g. ${dbname}_${domain}.
Also updated test and docs for dbname parameter and add acceptance test for
dbname parameter feature
mysql doesn't allow ssl=true/false in my.cnf if it hasn't been compiled
with ssl, therefor add a new parameter ssl-disable which makes sure the
template doesn't write anything with ssl to the config.
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.
This adds hash parameters to mysql::server to allow specifying grants, users, and databases to
create automatically, which works nicely with Hiera's automatic parameter lookup functionality
In PE3.1 it parses the comment #Deprecated at the top of the parameters
as if it's the class description. Move this so PE3.1 doesn't falsely
claim mysql::server is now deprecated.
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.
Handful of changes here, such as removing flush (so that mysql_user
can be used for root password changes) and other tweaks here.
Add time option to mysql::backup.
This work adds a new mysql::globals class which contains a hash used to
build my.cnf from. It's used to share this data across multiple classes
so that the client and server can share this data.
End users can modify content in my.cnf by including mysql::globals and
passing in override_options as a hash that looks like:
override_options = { 'mysqld' => { 'max_connections' => '120' } }
This completely replaces the mess of parameters that existed in the main
mysql class before.
Completely refactor mysql::server and rework the API. This changes
ordering, changes from execs{} to mysql_user for the root password,
removes some functionality (like the etc_root_password), and generally
makes some tough decisions about how mysql::server should be built.
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.
Since Rawhide is a rolling kind of release with no version numbers,
the operatingsystemrelease will actually return "Rawhide" instead
of any Integer. So we better check whether operatingsystemrelease
is an Integer before comparing numbers and cover Rawhide, too.
The current MySQL module is hard to modify, test, and drop in
replacement components to. This work starts out by refactoring
the bindings support in MySQL to a completely seperate bindings
class in order to reduce the amount of parameters in the main
class for a feature that is infrequently used.
In addition to this start the movement of client configuration
and packages to the mysql::client::* namespace.
* mysql::backup backuprotate parameter sets the number of backups to keep,
default is 30.
* Use bash in mysqlbackup.sh to get exit status of mysqldump when piped to
bzip2. Unfortunately there is no easy portable way to do that.
* Only delete old backups when current backup finished successfully.
* Try hard not to delete files that we didn't create (i.e. README or other
backups).
This adds a parameter (default value is like old behavior) so that the
my.cnf file isn't managed (created/updated) by the mysql module at all
which is necessary for our environment. We need to set all parameters by
ourself. If we don't set a parameter then the default from the mysqld
binary should be used instead of any default parameter the mysql module
provides us.
by hand and then you change your mysql::server entry to match. If you
also change any mysql::db entries at the same time this causes those to
be attempted before your /root/.my.cnf is updated.
I can't add rspec testing for this until https://github.com/rodjek/rspec-puppet/pull/106
is merged.
Without this commit, puppetlabs-mysql breaks mysql configuration by inserting a
dummy default-storage-engine directive. This will prevent mysql daemon from
starting up.
For example:
notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content:
--- /etc/mysql/my.cnf 2013-04-25 21:36:25.000000000 +0000
+++ /tmp/puppet-file20130425-12937-10tcf50-0 2013-04-25 21:42:49.000000000 +0000
@@ -29,6 +29,8 @@
expire_logs_days = 10
max_binlog_size = 100M
+default-storage-engine = undef
+
[mysqldump]
Removal of the ambiguously named package_name parameter, without having a version provide a deprecation warning for a reasonable amount of time seems unreasonable.
As Hunner suggests, adding a workaround variable to init.pp and use that as package name gives us the ability to warn users about the upcoming deprecation, while still maintaining backwards compatibility.
PHP libraries are required by many apps. This class assumes 'normal'
names for these packages, but allows other packages names to be passed
for variances such as 'php53-mysql' on RedHat and FreeBSD.
We are using this manifest file and it cannot find *Mysql_user* please change it to *Database_user*. I suppose that this was changed after a refactoring of some sort
Best, Nikola
When the root password is not managed, it causes mysql to
fail b/c it does not create the /root/.my.cnf file (which causes
all mysql commands from the provider to fail)
When using failover options such as Corosync, it's preferable to allow the failover software to manage the starting and stopping of the service. This parameter allows that to happen.
Added a parameter to mysql::backup to make bzip2 compression
optional. Compression is enabled by default, so current behavior
is not affected.
Rationale:
We are storing our MySQL backups on a system with deduplication.
Compression and dedup do not play well together, so it's advantagous
to be able to disable it.
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.
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.
Show that mysql:db can also import SQL from a file in order to, for
example, initialize a database schema. Since it requires class
mysql::server, we assume to run all commands as the root mysql user
against the local mysql server.
No need for setting default values to class parameters and then testing
to confirm they are set to non-default values. Simply do not give them
values to begin with.
Secures the MySQL installation by removing the test database and the
default users that are created during the MySQL first-run
(root@${fqdn}, @%, @localhost, etc.).
Includes rspec tests and updated documentation.
notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/returns: mysqladmin: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Even though it's not fatal, it's cleaner for Exec['set_mysql_rootpw'] to require File['/etc/mysql/conf.d'].
This commit adds a ssl parameter to the mysql::config class.
Setting ssl to true adds the following parameters to the template.
ssl_ca - path to ssl-ca
ssl_cert - path to ssl-cert
ssl_key - path to ssl-key
In Puppet 2.6, negate boolean wasn't handled in resources attribues.
Also hashes values were not accepted in functions. The manifests have
been updated to resolve compilation issues in Puppet 2.6.
On Ubuntu, mysql should use upstart provider instead of init.d. This
change overrides the init provider until the issue with init provider
can be addressed.
Prevously, the server class declared the config class and
the config class had a relationship to the server class.
This actually meant that the config class could never be declared
by itself b/c it exlicity depended on the server class (which it
could never resolve externally b/c it would result in a redeclaration
of the config class itself.)
This issue actually made it impossible to test the manifest on its
own with rspec-puppet. This commit makes it much easier to write
rspec tests for the config class.
Since the set_mysql_rootpw exec is only created
when the password is being managed, having the mysql
resource (which always exists) reference it leads
to an error when the mysql root password is not being
managed.
This commit resolves the issue by having the set
mysql rootpw exec notify the mysql restart if it
changes.
This commit displays the detected osfamily that
is not supported by this module.
It was previously unclear to users seeing the failure
what the value of osfamily was that was causing the
failure.
This is a major change to the module and would be released as a new
version.
* Add self.instances to database and database_user for puppet resource.
* Update database provider to use flush method.
* Update module to conform to puppet-lint recommendations.
* Cleanup some unecessary logic in mysql::db define type.
* Move mysql_restart to config class.
* Use class to class dependency instead of resource dependency.
* Change appropriate rspec-puppet tests.
* Add fixtures directory to simplify testing.
* Update raketask and spec_helper to reflect fixture changes.
* Update mysql_password function to support validation.
* Move client installation to a separate class.
* Update documentation and readme.
ever hit the default.
Moving the variables to just after the case statement will set
them, removing the default part of the case will cause this class
to fail on unsupported distros.
Commit e3b9fd broke the mysql::db defined type by always notifying the
Exec[${name}-import-import] resource even though the resource may not be
declared if the $sql parameter was not given. This commit adds an
in-selector to only notify the Exec resource if the $sql parameter has a
value. More extensive rspec-puppet tests have been provided to protect
against this in the future.
Previous to this commit, if the sql parameter was provided to a
declaration of the mysql::db defined type, the defined type would always
load the sql script on every catalog run. This changes the exec that
loads that sql script to be refreshonly unless the enforce_sql parameter
is set to true.
Configuration was moved to config hash param of the mysql::server class.
This was done so that additional parameters can be
added in the future and not have to be added to
both mysql::config and mysql::server as class params
This patch updates the README, docs, and examples to
correctly use the parameter.
/etc/mysql/my.cnf was being managed and /etc/mysql was not.
This was causing failures if the directory was not created
by the package.
This commit manages it in case it was not created by the package.