Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add replicate_do_db #28

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
default['percona']['server']['replication']['replication_sql'] = '/etc/mysql/replication.sql'
default['percona']['server']['replication']['slave_transaction_retries'] = 10
default['percona']['server']['replication']['slave_exec_mode'] = 'IDEMPOTENT'
default['percona']['server']['replication']['replicate_do_db'] = []

# Mysqld_safe
default['percona']['server']['skip_syslog'] = false
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
description 'Installs Percona MySQL client and server'
source_url 'https://github.com/hostinger/chef-percona'
issues_url 'https://github.com/hostinger/chef-percona/issues'
version '5.11.25'
version '5.11.26'
chef_version '>= 16.0'

depends 'yum'
Expand Down
6 changes: 6 additions & 0 deletions templates/my.cnf.main.erb
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ replicate-ignore-db = <%= ignore_db %>
<% end -%>
<% end -%>

<% unless node["percona"]["server"]["replication"]["replicate_do_db"].empty? %>
<% Array(node["percona"]["server"]["replication"]["replicate_do_db"]).each do |db| -%>
replicate-do-db = <%= db %>
<% end -%>
<% end -%>

<% unless node["percona"]["server"]["replication"]["ignore_table"].empty? %>
# Creates a replication filter by telling the replica SQL thread not to replicate any statement that updates the specified table, even if any other tables might be updated by the same statement.
<% node["percona"]["server"]["replication"]["ignore_table"].each do |ignore_table| -%>
Expand Down
Loading