Skip to content

Commit

Permalink
Merge pull request #23 from hostinger/fix/after_sync
Browse files Browse the repository at this point in the history
Fixes after sync with upstream
  • Loading branch information
PovilasV1 authored Oct 30, 2023
2 parents 1dc16eb + 13d9de1 commit 8427adb
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 43 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,8 @@ jobs:
strategy:
matrix:
os:
- almalinux-8
- almalinux-9
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- ubuntu-1804
- ubuntu-2004
- ubuntu-2204
- rockylinux-8
suite:
- client-57
- client-80
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/stale.yml

This file was deleted.

2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,12 @@
default['percona']['cluster']['wsrep_node_name'] = ''
default['percona']['cluster']['wsrep_notify_cmd'] = ''
default['percona']['cluster']['wsrep_sst_auth'] = ''
default['percona']['cluster']['pxc_encrypt_cluster_traffic'] = 'OFF'

# These both are used to build wsrep_sst_receive_address
default['percona']['cluster']['wsrep_sst_receive_interface'] = nil # Works like node["percona"]["server"]["bind_to"]
default['percona']['cluster']['wsrep_sst_receive_port'] = '4444'
default['percona']['cluster']['wsrep_node_address'] = nil

default['percona']['cluster']['innodb_locks_unsafe_for_binlog'] = 1
default['percona']['cluster']['innodb_autoinc_lock_mode'] = 2
8 changes: 7 additions & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ def percona_backup_package
node['platform_version'].to_f >= 20.04 ? 'percona-xtrabackup-80' : 'xtrabackup'
end
when 'rhel'
node['platform_version'].to_i >= 8 ? 'percona-xtrabackup-80' : 'percona-xtrabackup'
if node['percona']['version'].to_i >= 8
'percona-xtrabackup-80'
elsif node['percona']['version'] == '5.7'
'percona-xtrabackup-24'
else
'percona-xtrabackup'
end
end
end

Expand Down
6 changes: 3 additions & 3 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Installs Percona MySQL client and server'
source_url 'https://github.com/sous-chefs/percona'
issues_url 'https://github.com/sous-chefs/percona/issues'
version '3.4.4'
source_url 'https://github.com/hostinger/chef-percona'
issues_url 'https://github.com/hostinger/chef-percona/issues'
version '5.11.21'
chef_version '>= 16.0'

depends 'yum'
Expand Down
2 changes: 2 additions & 0 deletions recipes/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
#

include_recipe 'percona::package_repo'
include_recipe 'yum-epel' if platform_family?('rhel')

pkgs = node['percona']['client']['packages'].empty? ? percona_client_packages : node['percona']['client']['packages']
pkgs << percona_devel_package if node['percona']['client']['install_devel_package']
pkgs << 'zstd' if node['percona']['version'].to_i >= 8 && node['platform_version'].to_f < 8

package pkgs do
action node['percona']['client']['package_action'].to_sym
Expand Down
4 changes: 3 additions & 1 deletion recipes/configure_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@
end

if Array(server['role']).include?('cluster')
wsrep_sst_auth = if node['percona']['cluster']['wsrep_sst_auth'] == ''
wsrep_sst_auth = if node['percona']['version'].to_f > 5.7
''
elsif node['percona']['cluster']['wsrep_sst_auth'] == ''
"#{node['percona']['backup']['username']}:#{passwords.backup_password}"
else
node['percona']['cluster']['wsrep_sst_auth']
Expand Down
15 changes: 11 additions & 4 deletions templates/my.cnf.cluster.erb
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,19 @@ wsrep_sst_method = <%= node["percona"]["cluster"]["wsrep_sst_metho
wsrep_node_name = <%= node["percona"]["cluster"]["wsrep_node_name"] %>
wsrep_notify_cmd = <%= node["percona"]["cluster"]["wsrep_notify_cmd"] %>
wsrep_sst_receive_address = <%= node["percona"]["cluster"]["wsrep_sst_receive_address"] %>
<% if node["percona"]["cluster"]["wsrep_node_address"] %>
wsrep_node_address = <%= node["percona"]["cluster"]["wsrep_node_address"] %>
<% end -%>
<% unless @wsrep_sst_auth.empty? -%>
wsrep_sst_auth = "<%= @wsrep_sst_auth %>"
<% end -%>
<% if node["percona"]["version"].to_f < 5.7 %>
innodb_locks_unsafe_for_binlog = <%= node["percona"]["cluster"]["innodb_locks_unsafe_for_binlog"] %>
<% end -%>
innodb_autoinc_lock_mode = <%= node["percona"]["cluster"]["innodb_autoinc_lock_mode"] %>

<%- if node["percona"]["version"].to_f >= 8.0 %>
pxc_encrypt_cluster_traffic = <%= node["percona"]["cluster"]["pxc_encrypt_cluster_traffic"] %>
<% end %>

<% if @old_passwords %>
#
Expand Down Expand Up @@ -301,7 +308,7 @@ log-queries-not-using-indexes = <%= node["percona"]["server"]["log_queries_not_u
# is required for both source and replica hosts. It defaults to 1 if
# "master-host" is not set, but will MySQL will not function as a source
# if it is omitted.
# server-id = <%= node["percona"]["server"]["server_id"] %>
server-id = <%= node["percona"]["server"]["server_id"] %>

<% unless node["percona"]["server"]["replication"]["ignore_db"].empty? %>
# Tells the replica SQL thread not to replicate any statement where the default database is.
Expand Down Expand Up @@ -489,9 +496,9 @@ innodb_additional_mem_pool_size = <%= node["percona"]["server"]["innodb_addition
innodb_buffer_pool_size = <%= node["percona"]["server"]["innodb_buffer_pool_size"] %>

innodb_buffer_pool_instances = <%= node["percona"]["server"]["innodb_buffer_pool_instances"] %>

<%- if node["percona"]["version"].to_f < 5.7 %>
innodb_buffer_pool_populate = <%= node["percona"]["server"]["innodb_buffer_pool_populate"] %>

<%- end %>
# InnoDB stores data in one or more data files forming the tablespace.
# If you have a single logical drive for your data, a single
# autoextending file would be good enough. In other cases, a single file
Expand Down

0 comments on commit 8427adb

Please sign in to comment.