Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Max allowed packet #159

Closed
wants to merge 2 commits into from

3 participants

@Aethylred

A patch to set the max_allowed_packet setting in my.cnf.

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet

Required for setting up MySQL for the Puppet Dashboard: http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html

@blbradley

I ran into this issue today myself. What can we do to make this happen?

@hunner
Owner

Thanks for your PR @Aethylred. This functionality was merged as part of #179

@hunner hunner closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  README.md
@@ -81,6 +81,8 @@ Installs mysql-server packages, configures my.cnf and starts mysqld service:
Database login information stored in `/root/.my.cnf`.
+**Note:** The `config-hash` parameter is passed through to the `mysql::config` class as its parameters. Check the header comments in `manifests/config.pp` to see which MySQL settings can be set.
+
### mysql::db
Creates a database with a user and assign some privileges.
View
40 manifests/config.pp
@@ -19,6 +19,7 @@
# [*default_engine] - configure a default table engine
# [*root_group] - use specified group for root-owned files
# [*restart] - whether to restart mysqld (true/false)
+# [*max_allowed_packet] - sets the max_allowed_packet size
#
# Actions:
#
@@ -34,25 +35,26 @@
# }
#
class mysql::config(
- $root_password = 'UNSET',
- $old_root_password = '',
- $bind_address = $mysql::params::bind_address,
- $port = $mysql::params::port,
- $etc_root_password = $mysql::params::etc_root_password,
- $service_name = $mysql::params::service_name,
- $config_file = $mysql::params::config_file,
- $socket = $mysql::params::socket,
- $pidfile = $mysql::params::pidfile,
- $datadir = $mysql::params::datadir,
- $ssl = $mysql::params::ssl,
- $ssl_ca = $mysql::params::ssl_ca,
- $ssl_cert = $mysql::params::ssl_cert,
- $ssl_key = $mysql::params::ssl_key,
- $log_error = $mysql::params::log_error,
- $default_engine = 'UNSET',
- $root_group = $mysql::params::root_group,
- $restart = $mysql::params::restart,
- $purge_conf_dir = false
+ $root_password = 'UNSET',
+ $old_root_password = '',
+ $bind_address = $mysql::params::bind_address,
+ $port = $mysql::params::port,
+ $etc_root_password = $mysql::params::etc_root_password,
+ $service_name = $mysql::params::service_name,
+ $config_file = $mysql::params::config_file,
+ $socket = $mysql::params::socket,
+ $pidfile = $mysql::params::pidfile,
+ $datadir = $mysql::params::datadir,
+ $ssl = $mysql::params::ssl,
+ $ssl_ca = $mysql::params::ssl_ca,
+ $ssl_cert = $mysql::params::ssl_cert,
+ $ssl_key = $mysql::params::ssl_key,
+ $log_error = $mysql::params::log_error,
+ $default_engine = 'UNSET',
+ $root_group = $mysql::params::root_group,
+ $restart = $mysql::params::restart,
+ $max_allowed_packet = $mysql::params::max_allowed_packet,
+ $purge_conf_dir = false
) inherits mysql::params {
File {
View
1  manifests/params.pp
@@ -17,6 +17,7 @@
$etc_root_password = false
$ssl = false
$restart = true
+ $max_allowed_packet = '16M'
case $::operatingsystem {
'Ubuntu': {
View
4 templates/my.cnf.erb
@@ -19,10 +19,10 @@ skip-external-locking
<% if bind_address %>
bind-address = <%= bind_address %>
-<% end %>
+<% end %>
key_buffer = 16M
-max_allowed_packet = 16M
+max_allowed_packet = <%= max_allowed_packet %>
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
Something went wrong with that request. Please try again.