Skip to content

PMM-7: Add support for Percona Server 8.4 #124

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

Merged
merged 13 commits into from
Apr 28, 2025
17 changes: 17 additions & 0 deletions pmm_qa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# WIP - PMM-QA Framework Documentation
Sets up all types of dbs base one or with replication sets.

Available flags:
-
- ```--database``` Sets up selected DB available options:
- ```ps``` - Sets up Percona server, example: ```--database ps=8.4,SETUP_TYPE=gr,QUERY_SOURCE=perfschema```
- parameters:
- SETUP_TYPE:
- gr - Group replication
- QUERY_SOURCE - The Performance Schema provides detailed, real-time metrics on various server
performance aspects, while the Slow Query Log records queries that exceed a defined execution
time threshold, helping to identify inefficient queries.
- perfschema
- slowlog
- COUNT - Count of percona server dbs created.
- Available versions: ```8.4```, ```8.0```, ```5.7```
15 changes: 15 additions & 0 deletions pmm_qa/percona_server/init.sql.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Create replication user and grant necessary privileges
SET SQL_LOG_BIN=0;
CREATE USER '{{ replication_user }}'@'%' IDENTIFIED BY '{{ replication_password }}';
GRANT REPLICATION SLAVE ON *.* TO '{{ replication_user }}'@'%';
GRANT CONNECTION_ADMIN ON *.* TO '{{ replication_user }}'@'%';
GRANT BACKUP_ADMIN ON *.* TO '{{ replication_user }}'@'%';
GRANT GROUP_REPLICATION_STREAM ON *.* TO '{{ replication_user }}'@'%';
-- GRANT SERVICE_CONNECTION_ADMIN ON *.* TO '{{ replication_user }}'@'%';
-- GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO '{{ replication_user }}'@'%';
FLUSH PRIVILEGES;
SET SQL_LOG_BIN=1;

-- Configure group replication recovery credentials
CHANGE REPLICATION SOURCE TO SOURCE_USER='{{ replication_user }}', SOURCE_PASSWORD='{{ replication_password }}' FOR CHANNEL 'group_replication_recovery';

45 changes: 45 additions & 0 deletions pmm_qa/percona_server/my.cnf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[mysqld]
# General server configuration
server_id={{ server_id_start + item - 1 }}
bind-address=0.0.0.0
port={{ mysql_listen_port }}

# General replication settings
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
log_bin=binlog
log_replica_updates=ON
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
lower_case_table_names=2 # MacOS-specific, but also good generally

# MySQL 8.4 compatibility settings
report_host=ps_pmm_{{ps_version}}_{{ item }}

# Group Replication Settings
plugin_load_add='group_replication.so'
loose-group_replication_group_name='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
loose-group_replication_local_address='ps_pmm_{{ps_version}}_{{ item }}:{{ group_seeds_port }}'
loose-group_replication_group_seeds='{% for i in range(1, nodes_count | int + 1) %}ps_pmm_{{ps_version}}_{{ i }}:{{ group_seeds_port }}{% if not loop.last %},{% endif %}{% endfor %}'
loose-group_replication_communication_stack=XCOM

# Group replication behavior
loose-group_replication_start_on_boot=OFF
loose-group_replication_bootstrap_group=OFF
loose-group_replication_single_primary_mode=ON
loose-group_replication_enforce_update_everywhere_checks=OFF

# Recovery settings
loose-group_replication_recovery_get_public_key=ON
loose-group_replication_recovery_retry_count=10
loose-group_replication_recovery_reconnect_interval=60

# Crash-safe replication settings
relay-log=ps_pmm_{{ps_version}}_{{ item }}-relay-bin
relay_log_recovery=ON
relay_log_purge=ON

# Performance and connection settings
max_connections=1000
innodb_buffer_pool_size=256M

Loading
Loading