pxc_strict_mode does not detect version mismatch

Description

How to reproduce

 

It's documented that it should check major version:

https://docs.percona.com/percona-xtradb-cluster/5.7/features/pxc-strict-mode.html#major-version-check

 

 

On a 5.7 node

 

 

On 8.0 node again:

 

Other nodes will then crash:

 

 

Environment

None

AFFECTED CS IDs

CS0034157

Activity

Show:

Kamil Holubicki March 14, 2023 at 8:36 AM

Andrew Garner February 28, 2023 at 3:52 PM

The initial mixed-version-node-is-writable problem seems related to initialization. PXC 8.0 initializes wsrep_protocol_version = wsrep_max_protocol_version. When a node joins a cluster, there seems to be some assumption that the view and wsrep_protocol_version will be initialized via SST. This doesn't work when upgrading from 5.7 to 8.0, so wsrep_protocol_version remains at 4 even in a mixed-mode cluster effectively disabling the pxc-strict-mode check.

The wsrep_protocol_version does get updated later in a rolling upgrade once a new cluster view is formed. E.g. when the second node exits the cluster and a new view is formed, then wsrep_protocol_version downgrades back to 3 and pxc-strict-mode starts being enforced.

However, even if a node manages to enforce pxc_strict_mode initially, when the node state is Donor/Desynced (or any not-synced state) this check is disabled again.

This seems to be a defect in the block_write_while_in_rolling_upgrade implementation which disables the check if the node isn't strictly in the "synced" state:

yoann.lacancellera February 28, 2023 at 9:49 AM

Could relate to

yoann.lacancellera February 28, 2023 at 9:45 AM
Edited

Can not reproduced if you restart mysql 8.0 after its initial SST and upgrade.

yoann.lacancellera February 28, 2023 at 9:40 AM

In case you do not reproduce, simply set up a 3 nodes cluster with 2 5.7 and 1 8.0 node.

It can be repeated by removing the 8.0 datadir to force SST.

 

 

Done

Details

Assignee

Reporter

Needs Review

Yes

Needs QA

Yes

Affects versions

Priority

Smart Checklist

Created February 24, 2023 at 1:45 PM
Updated March 6, 2024 at 8:44 PM
Resolved April 10, 2023 at 5:44 PM