Tweak MySQL logging configuration
For a galera replication we do not need binary logs, but we need binary logs in
case customer needs to perform MySQL backup. In this review we propose to limit
rotation period for 1 day, and set option to disable binary logging by default.
Closes-Bug: #1533805
(cherry picked from commit 9660e49bdf
)
Conflicts:
deployment/puppet/galera/manifests/init.pp
tests/noop/spec/hosts/database/database_spec.rb
Change-Id: I001c87081a3b334eb8844abca60e468370ea5f24
This commit is contained in:
parent
09eb9e36bd
commit
da6950c868
|
@ -48,6 +48,20 @@
|
|||
# (optional) The method for state snapshot transfer between nodes
|
||||
# Defaults to xtrabackup-v2
|
||||
# xtrabackup, xtrabackup-v2, mysqldump are supported
|
||||
#
|
||||
# [*binary_logs_enabled*]
|
||||
# Set this value to true for enabling MySQL binary logging.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*binary_logs_period*]
|
||||
# (optional) Set binary logrotation period in days.
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*binary_logs_maxsize*]
|
||||
# (optional) If a write to the binary log causes the current log file
|
||||
# size to exceed the value of this variable, the server rotates the
|
||||
# binary logs (closes the current file and opens the next one). The
|
||||
# minimum value is 4096 bytes. The maximum and default value is 512MB.
|
||||
|
||||
class galera (
|
||||
$cluster_name = 'openstack',
|
||||
|
@ -61,6 +75,9 @@ class galera (
|
|||
$status_check = true,
|
||||
$wsrep_sst_method = 'xtrabackup-v2',
|
||||
$wsrep_sst_password = undef,
|
||||
$binary_logs_enabled = false,
|
||||
$binary_logs_period = 1,
|
||||
$binary_logs_maxsize = '512M',
|
||||
) {
|
||||
|
||||
include galera::params
|
||||
|
|
|
@ -5,12 +5,15 @@ port=3307
|
|||
max_connections=<%= @max_connections %>
|
||||
default-storage-engine=innodb
|
||||
binlog_format=ROW
|
||||
log_bin=mysql-bin
|
||||
collation-server=utf8_general_ci
|
||||
init-connect='SET NAMES utf8'
|
||||
character-set-server=utf8
|
||||
default-storage-engine=innodb
|
||||
expire_logs_days=10
|
||||
<% if @binary_logs_enabled -%>
|
||||
log_bin=mysql-bin
|
||||
expire_logs_days=<%= @binary_logs_period %>
|
||||
max_binlog_size=<%= @binary_logs_maxsize %>
|
||||
<% end -%>
|
||||
|
||||
skip-external-locking
|
||||
<% if @skip_name_resolve -%>
|
||||
|
|
Loading…
Reference in New Issue