Skip to content

Add Percona XtraDB Cluster v8.4.4 #56

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

abg
Copy link
Member

@abg abg commented Feb 20, 2025

Thanks for opening a PR. Please make sure you've read and followed the Contributing guide, including signing the Contributor License Agreement.

Feature or Bug Description

What does this PR change?

Adds support for running Percona XtraDB Cluster v8.4 through pxc-release.

The pxc-mysql job property mysql_version now supports the value "8.4", but the default remains "8.0" for the time being.

Motivation

Tell us about the problem you are facing, with context, that this PR solves.

MySQL v8.0 is reaching EOL in April 2026.

MySQL v8.4 is the next LTS release and the next logical step to keep pxc-release on a supported version of MySQL.

Percona released Percona XtraDB Cluster v8.4.0 in November 2024, and v8.4.4 (April 2025) is the latest available version.

@abg
Copy link
Member Author

abg commented Feb 20, 2025

This PR is in a draft mode while we're validating the transition from 8.0 to 8.4.

Some Percona features in pxc-release are very broken under v8.4, notable the Percona audit log plugin has been removed in favor of an "Audit Log Filter" component, that needs to be loaded configured and managed in a much different way.

We also note the upgrade paths from existing deployments may be troublesome for late upgraders. Upgrading MySQL 5.7 directly MySQL v8.4 is not supported:

https://dev.mysql.com/doc/refman/8.4/en/upgrade-paths.html

Essentially there is no protocol support for upgrading from such an old version to the latest. An 8.4 node cannot join a 5.7 cluster, and there is no SST script support for this as a result.

From a Galera / PXC perspective, a deployment must be upgraded to v8.0 first and then to v8.4. Some fast-fail guards around upgrades may be in order - i.e. when a 5.7 instance is detected do not attempt upgrading to 8.4 and just fail the deployment.

@abg abg force-pushed the feature/add-percona-xtradb-cluster-v8.4 branch from 7b3ee4a to c1706dd Compare March 2, 2025 21:31
@abg abg force-pushed the feature/add-percona-xtradb-cluster-v8.4 branch from c1706dd to 881898b Compare April 17, 2025 02:28
Copy link

linux-foundation-easycla bot commented Apr 17, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@abg abg changed the title Add Percona XtraDB Cluster v8.4.3 Add Percona XtraDB Cluster v8.4.4 Apr 17, 2025
@abg abg force-pushed the feature/add-percona-xtradb-cluster-v8.4 branch from 881898b to e93ab53 Compare April 17, 2025 03:36
@abg abg closed this Apr 17, 2025
@abg abg reopened this Apr 17, 2025
@abg abg force-pushed the feature/add-percona-xtradb-cluster-v8.4 branch from e93ab53 to f146fac Compare April 17, 2025 16:14
abg added 8 commits April 18, 2025 17:46
- Adds a new percona-xtradb-cluster-8.4 package and associated bosh blob
- Adds a new percona-xtrabackup-8.4 package and associated bosh blob
- Add a "mysql_version = '8.4'" option to the pxc-mysql job
- Slightly cleans up the existing percona-xtradb-cluster-8.0 package
  while in the area to minimize differences between 8.0 and 8.4

Other notes:
- MySQL v8.4 vendors parts of the boost (1.84.0) library used by MySQL

  The galera module also uses boost program_options so an external boost
  is still required to build Galera bits.

- Re-enables mysql_native_password for compatibility;  This is the
  legacy sha1 based authentication method that is disabled by default in
  MySQL v8.4 and will be removed entirely from the next MySQL LTS
  release (already
  removed in MySQL v9.0+ innovation releases)

  Internally a transition to caching_sha2_password should be done, but
  this requires using TLS (or unix sockets) everywhere  which may not
  yet be the case. Needs more investigation.

wip still because:
- Upgrades are not handled cleanly.  Existing logic upgrades 5.7 => 8.0
  to handle gracefully upgrades from a crashed state (or fail cleanly);
  Similar logic is probably required for v8.4
- my.cnf dedup might be useful, at least in the template.  repeating 8.0
  and 8.4 options "redundantly" to maintain existing mysql-5.7 compatibility.
- Still using the old MySQL v8.0 boost (v1.77.0) for building PXC v8.4's
  wsrep provider plugin; Maybe bump to a newer version (at least v1.84.0
  vendored in MySQL 8.0)

  Note: We cannot just use the vendored MySQL 8.4 boost because it's
  missing the "program_options" bits required by libgalera but not used
  by the main MySQL version.

- Minimal testing - only manual testing to see compilation succeed and a
  happy path deploy work.
Leverages the "setup-audit-log-filter-component" package to configure
audit logs using the new Percona Audit Log Filter Component.

This audit log setup is more complicated than in the past with a plugin
which was previously driven by simple my.cnf configuration options.

Now, a set of SQL commands must be run to create tables and install the
audit log filter component.   The component will read options from the
my.cnf, but these must be prefixed with "loose-" so MySQL does not fail
prior to installing the component.  Filters are configured after
installation using UDFs provided by the component.

A few sharp edges:
- Audit log components general local transactions, but will generate
  inconsistent GTIDs across members of a cluster.

  To avoid this the post-start script runs with "sql_log_bin=off" AND
  "wsrep_on=off" to avoid replicating any changes.  Without this, filter
  changes via "audit_log_filter_set_*" udfs are binlogged, but not
  replicated to other Galera nodes.  Initial plugin setup with CREATE
  TABLE / INSTALL COMPONENT _are_ replicated, but not necessarily
  binlogged.

  This ensures correct GTID consistency across nodes of a cluster when
  gtid_mode is enabled, but does not prevent an operator from
  introducing inconsistencies in the future by manually applying
  additional filters.

- Percona v8.4.3 has several bugs around audit log filters.

  1. Crash when running certain Percona specific queries when audit
     logging is enabled.

     This problem is currently fixed in the wip branch, by backporting a
     patch from PXC v8.4.4.

  2. Audit log filters do not support wildcard users

     That is you can only apply log filters to "user@localhost" but or
     "[email protected]" but not "user@%".

     This problem is currently fixed in the wip branch by backporting a
     patch from PXC v8.4.4.

  3. Audit log format has changed substantially and is now logged as a
     JSON array.  The "active" audit log is invalid json until rotation
     is performed and the array is "closed"

  4. Various Percona Audit log filter functionality seems broke in this
     version, including the "audit_log_read(...)" UDF.
binlog_format = ROW has been the default from MySQL v5.7 and is
deprecated in MySQL v8.4.

Removing from the my.cnf.
Similar to upgrades from 5.7 to 8.0, run crash recovery before starting
a MySQL 8.0 data directory on MySQL v8.4.

wip because:
- Detecting MySQL v8.4 vs. v8.0 is a little troublesome.  Currently the check
  involves checking if there is a "mysql_upgrade_history" file which is
  only written by MySQL v8.4.

  Maybe worth pondering if a better check exists, or if we could extract
  better information from some other place (maybe sdi information from
  the mysql tablespace?)
Previously had checks for "version != 8.0", but realistically this
functionally meant "MySQL v8.0 _or later_". Now skip checks if the
test suite is running in MySQL 5.7 mode only.
@abg abg force-pushed the feature/add-percona-xtradb-cluster-v8.4 branch from f146fac to a76902e Compare April 18, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant