Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add read_only tunable useful for replication slave servers #52

Merged
merged 1 commit into from

2 participants

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.
Showing with 4 additions and 0 deletions.
  1. +1 −0  attributes/server.rb
  2. +3 −0  templates/default/my.cnf.erb
View
1  attributes/server.rb
@@ -148,6 +148,7 @@
default['mysql']['tunable']['log_slave_updates'] = false
default['mysql']['tunable']['sync_binlog'] = 0
default['mysql']['tunable']['skip_slave_start'] = false
+default['mysql']['tunable']['read_only'] = false
default['mysql']['tunable']['log_error'] = nil
default['mysql']['tunable']['log_queries_not_using_index'] = true
View
3  templates/default/my.cnf.erb
@@ -131,6 +131,9 @@ sync_binlog = <%= node['mysql']['tunable']['sync_binlog'] %>
<%- if node['mysql']['tunable']['skip_slave_start'] %>
skip_slave_start
<%- end %>
+<%- if node['mysql']['tunable']['read_only'] %>
+read_only = 1
+<%- end %>
#
# * InnoDB
Something went wrong with that request. Please try again.