Bug #103251 Allow cross-platform clone
Submitted: 8 Apr 14:09 Modified: 8 Apr 15:07
Reporter: Roman Vynar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S4 (Feature request)
Version:8.0.22 OS:Ubuntu (18.04.5 LTS)
Assigned to: CPU Architecture:ARM (aarch64)
Tags: ARM clone

[8 Apr 14:09] Roman Vynar
Description:
For some reason, clone plugin does not support cross-platform clone.

For example, I have Group Replication cluster running on x86_64 nodes. I took one node and re-stage it into aarch64. When a new node tries to join the cluster I get: "Error message: Clone Donor platform: x86_64 is different from Recipient platform: aarch64".

Detailed log:
2021-04-06T13:45:25.835715Z 2 [System] [MY-011511] [Repl] Plugin group_replication reported: 'This server is working as secondary member with primary member address mysqldb1.local:3306.'
2021-04-06T13:45:26.836099Z 0 [Warning] [MY-013470] [Repl] Plugin group_replication reported: 'This member will start distributed recovery using clone. It is due to no ONLINE member has the missing data for recovering in its binary logs.'
2021-04-06T13:45:27.837080Z 0 [System] [MY-013471] [Repl] Plugin group_replication reported: 'Distributed recovery will transfer data using: Cloning from a remote group donor.'
2021-04-06T13:45:27.837497Z 0 [System] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to mysqldb2.local:3306, mysqldb1.local:3306, mysqldb3.local:3306 on view 15935164747167207:67.'
2021-04-06T13:45:27.837870Z 33 [System] [MY-011566] [Repl] Plugin group_replication reported: 'Setting super_read_only=OFF.'
2021-04-06T13:45:28.416776Z 33 [ERROR] [MY-011569] [Repl] Plugin group_replication reported: 'Internal query: CLONE INSTANCE FROM 'repl'@'mysqldb3.local':3306 IDENTIFIED BY '*****' REQUIRE SSL; result in error. Error number: 3866'
2021-04-06T13:45:28.416846Z 32 [ERROR] [MY-013465] [Repl] Plugin group_replication reported: 'There was an issue when cloning from another server: Error number: 3866 Error message: Clone Donor platform: x86_64 is different from Recipient platform: aarch64.'
2021-04-06T13:45:29.050991Z 33 [ERROR] [MY-011569] [Repl] Plugin group_replication reported: 'Internal query: CLONE INSTANCE FROM 'repl'@'mysqldb1.local':3306 IDENTIFIED BY '*****' REQUIRE SSL; result in error. Error number: 3866'
2021-04-06T13:45:29.051092Z 32 [ERROR] [MY-013465] [Repl] Plugin group_replication reported: 'There was an issue when cloning from another server: Error number: 3866 Error message: Clone Donor platform: x86_64 is different from Recipient platform: aarch64.'
2021-04-06T13:45:29.058779Z 33 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
2021-04-06T13:45:29.059234Z 32 [ERROR] [MY-013473] [Repl] Plugin group_replication reported: 'Due to a critical cloning error or lack of donors, distributed recovery cannot be executed. The member will now leave the group.'
2021-04-06T13:45:32.639014Z 0 [System] [MY-011504] [Repl] Plugin group_replication reported: 'Group membership changed: This member has left the group.'

How to repeat:
1. Run a Group Replication cluster on x86_64 nodes.
2. Add one extra node with aarch64.
3. The clone plugin will refuse to work.

Suggested fix:
I don't think there are any binary inconsistencies in the format of MySQL data files between x86_64 vs aarch64 at least.

If I copy the whole datadir from x86_64 when mysql is stopped, remove auto.cnf and start mysql on aarch64 it will work just fine. The node will join the cluster successfully. 

Can this be allowed somehow?
[8 Apr 15:07] MySQL Verification Team
Hi,

This is not a bug, but I will verify this as a Feature Request. 
The issue here is about the endianness of the platforms so cross-platform clones are unsupported but I believe this is a valid feature request as this is a feature that will be needed more and more.

Thanks for the report
Bogdan