Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #52 from sciurus/read_only

Add read_only tunable useful for replication slave servers
  • Loading branch information...
commit 3c24adfe0422a524658a4f8ac85a4349c68bbc78 2 parents 38b3db4 + da21009
@jtimberman jtimberman authored
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
@@ -178,6 +178,7 @@
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_warnings'] = false
View
3  templates/default/my.cnf.erb
@@ -185,6 +185,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 %>
<%- if node['mysql']['tunable']['transaction-isolation'] %>
transaction-isolation = <%= node['mysql']['tunable']['transaction-isolation'] %>
Please sign in to comment.
Something went wrong with that request. Please try again.