Commit graph

184 commits

Author SHA1 Message Date
Micah Anderson
ad04b1fbe7 Merge remote-tracking branch 'lelutin/squeeze_my_cnf' into shared 2012-04-11 18:25:17 -04:00
Micah Anderson
27773b88a5 fix $use_munin hiera check to be use_munin instead of incorrect use_nagios
add $use_nagios hiera check
2012-04-11 12:59:33 -04:00
Gabriel Filion
8180e27115 Import my.cnf from Debian Squeeze
Lenny support was phased out and squeeze is the current stable.

There is an instruction in the file that originally came from lenny:
skip-bdb doesn't exist anymore in the mysql version in squeeze, so the
config file makes a fresh mysql install crash on Squeeze.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2012-04-09 02:26:23 -04:00
Micah Anderson
a55ce915da switch hiera to pull its variables in parameterized classes instead of inline in the manifest 2012-04-04 17:47:13 -04:00
Micah Anderson
32fdce32d9 add note to README about mysql::server::account_security removing accounts by default, and how to get around it 2012-04-04 13:42:11 -04:00
Micah Anderson
db8103b0ba Merge remote-tracking branch 'immerda/master'
Conflicts:
	manifests/server/munin/default.pp
	manifests/server/nagios.pp
2012-04-04 12:22:09 -04:00
Micah Anderson
cc65b6c584 Merge branch 'shared' 2012-03-07 15:11:06 -05:00
Micah Anderson
7f4f7e0052 fix typo in name of mysql_qcache_mem graph 2012-03-07 15:10:48 -05:00
Micah Anderson
56c0601953 Merge branch 'shared' 2012-03-07 11:52:15 -05:00
Micah Anderson
d66e58c325 Merge commit '356fdab8147f8a32a3f14514f2bb77f4f312c734' into shared
Conflicts:
	files/munin/mysql_connections
	manifests/server/base.pp
	manifests/server/munin/default.pp
2012-03-07 11:49:28 -05:00
Micah Anderson
084f0cfb67 Merge branch 'shared' 2012-03-07 11:05:49 -05:00
Micah Anderson
e9ff8b6a23 Merge remote-tracking branch 'lelutin/root_pw_no_arg' into shared
Conflicts:
	manifests/server/base.pp
2012-03-07 11:02:01 -05:00
Micah Anderson
196560b997 Merge remote-tracking branch 'lelutin/nagios_service' 2012-02-29 23:50:22 -05:00
Gabriel Filion
64bbe64b96 Use the right parameter to nagios::service::mysql
check_hostname is not defined. We need to use check_host instead
2012-02-23 04:52:55 -05:00
mh
64e116cfb5 correct key for trocla lookup 2012-02-10 15:04:40 +01:00
mh
4ac7369515 migrate everything to hiera/trocla and use the new scoping style 2012-02-10 14:35:19 +01:00
Micah Anderson
60bb96c9a1 add the trigger privilege to the list of potential MYSQL_USER_PRIVS 2012-01-22 23:48:33 -05:00
mh
a72ab41660 add innodb_file_per_table option by default
mysql has one innodb file per default and this can become very
huge, which can trigger various issues [1]. So in general it
is recommended to set the innodb_file_per_table option [2].

[1] http://forums.mysql.com/read.php?35,121880,121886
[2] http://dev.mysql.com/doc/refman/5.0/en/innodb-multiple-tablespaces.html
2012-01-17 22:31:44 +01:00
Micah Anderson
f2dd063f82 fix missing end 2012-01-16 15:48:31 -05:00
Micah Anderson
2fc3849818 Instead of doing an update table_priv, we need to do GRANT/REVOKE statements
When we are working with tables_priv we need to first get a downcased array of the currently set privileges, and a downcased array of the desired permissions.

Then we make a list of the permissions to revoke by subtracting the requested permissions from the currently set ones.

If the list of permissions to revoke is not empty, then we issue a REVOKE.

Then we make a list of the permissions to add by subtracting the requested permissions from the current set (no need to add select again if it is already there).

Then if the set of permissions to add is not empty, then we actually execute the statement.
2012-01-01 15:43:47 -05:00
Micah Anderson
7f10702c5a table privileges need to be handled with GRANT/REVOKE statements instead of inserts of Y/N values into the table.
To handle this, this comment removes the create_row for table_privs, it also selects the actual value of the Table_priv so its value can be used instead of the method that is used for Y/N value settings
2012-01-01 15:35:44 -05:00
Micah Anderson
c650057bdc change the type name and the table_name to be less confusing 2012-01-01 15:30:40 -05:00
Micah Anderson
d42aafd7a8 changed the matches regexp to be not greedy so other things like tables and columns can be matched 2012-01-01 15:29:09 -05:00
Micah Anderson
b869455c74 table privileges don't have the name with _privs on the end, also the actually available privileges are less than was originally thought, so I trimmed those down 2012-01-01 15:28:30 -05:00
Micah Anderson
ae6dab7c25 add column grant to mysql_grant 2011-12-30 12:39:27 -05:00
Micah Anderson
1faf0b322f add table grant privilege handling to mysql_grant 2011-12-30 12:32:19 -05:00
Micah Anderson
e68fdf60f5 Merge remote-tracking branch 'riseup/master' 2011-12-30 12:22:50 -05:00
Micah Anderson
dfd86c83a3 Revert "add table and column privilege management to mysql_grant"
This reverts commit 74bf6b84e4. It was
accidentally pushed to shared_mysql before it was ready
2011-12-30 12:20:14 -05:00
Micah Anderson
74bf6b84e4 add table and column privilege management to mysql_grant 2011-12-30 12:11:03 -05:00
mh
8e18c75911 add admin_user define with trocla 2011-10-27 23:28:10 +02:00
mh
8ff5e446d6 make it possible to retrieve password from trocla 2011-10-18 02:55:10 +02:00
mh
585cbc381b fix grant on newer mysql version
MySQL introduced some new privileges in Versions > 5.1.6, add them
to our set, so puppet still knows what :all is.
2011-05-12 22:13:37 +02:00
mh
b8b6705865 we should pass the architecture to devel packages 2011-04-03 12:50:25 +02:00
Laurent Bachelier
fb1ec5b777 --all is deprecated 2011-03-18 17:51:34 +01:00
Laurent Bachelier
27c37a5b1b BDB is not compiled anymore on Debian systems
It would make the daemon fail to load if put in the config.
2011-03-17 15:55:13 +01:00
mh
d31940e3f0 Remove other default accounts due to security reasons 2011-02-25 17:27:19 +01:00
mh
995a291afa improve default database define to also support setting db and user to absent 2011-02-14 19:30:18 +01:00
mh
356fdab814 add some other mysql plugins 2010-12-21 22:10:34 +01:00
Gabriel Filion
e894ddb718 Avoid root password leak to process list
The current procedure of setting the root MySQL password leaks the root
password by giving it to the setmysqlpass.sh script on the command line.
This means that during the couple of seconds that the script is
executing, the password is visible in the process list!

Since we're already writing the password in the /root/.my.cnf file, make
the setmysqlpass.sh script parse this file to retrieve the password
instead of receiving it from a command line argument.

Also, in some shells the 'echo' command might appear in the process
list. Use a heredoc notation to create the output without using a
command.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-12-18 12:50:17 +01:00
Gabriel Filion
af8b414c32 Avoid root password leak to process list
The current procedure of setting the root MySQL password leaks the root
password by giving it to the setmysqlpass.sh script on the command line.
This means that during the couple of seconds that the script is
executing, the password is visible in the process list!

Since we're already writing the password in the /root/.my.cnf file, make
the setmysqlpass.sh script parse this file to retrieve the password
instead of receiving it from a command line argument.

Also, in some shells the 'echo' command might appear in the process
list. Use a heredoc notation to create the output without using a
command.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-12-15 08:30:53 -05:00
Micah Anderson
eeb5febdaa add mysql::client::perl, same as mysql::client::ruby 2010-11-02 21:32:39 -04:00
Micah Anderson
9583889456 add mysql munin graphs and adjust the file distribution to match the right location of where they are 2010-11-01 19:43:23 -04:00
Micah Anderson
b48f864b30 fully qualify the path to mysqladmin, without it, you will get this error:
Parameter unless failed: 'mysqladmin -uroot status > /dev/null' is both unqualifed and specified no search path at /etc/puppet/modules/mysql/manifests/server/base.pp:62

unless you have set globally:

Exec { path => "/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin" }
2010-10-29 15:05:16 -04:00
Micah Anderson
8067a1042b fixed stray semicolon 2010-10-26 17:39:40 -04:00
Micah Anderson
f43c0c883a fix script_path_in parameter 2010-10-26 17:37:36 -04:00
Micah Anderson
78fa3e62cf fix munin script path 2010-10-26 13:05:40 -04:00
Micah Anderson
9871e9319c move the mysql::server::munin::base class to its own file 2010-10-26 11:28:17 -04:00
Micah Anderson
b1ef87fbda fix incorrect munin graph names 2010-10-26 11:27:59 -04:00
Micah Anderson
50b6789a3a add the mysql munin graphs:
. mysql_connections
 . mysql_qcache
 . mysql_qcache_mem
 . mysql_size_all
2010-10-26 11:12:14 -04:00
Micah Anderson
fa67257056 . remove the check_mysql_health script from the mysql module, instead it belongs in the nagios module
. change the default nagios::service::mysql check to use the check_mysql_health 'connection-time' check mode, which is identical to the original check, with some additional information

. stop using nagios::plugin::deploy because this doesn't work when more than one node attempts to realize this class

. stop exporting the nagios_command because this doesn't work when more than one node attempts to realize this class

. remove the check_health define, instead this be how it was before, as the previous nagios::service::mysql define
2010-10-18 20:52:42 -04:00