Bug #108792 Clone plugin is not supported btw commercial and community version
Submitted: 16 Oct 2022 2:34 Modified: 18 Oct 2022 8:57
Reporter: Mughees Ahmed Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S3 (Non-critical)
Version:8.0.21 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[16 Oct 2022 2:34] Mughees Ahmed
Description:
Hello Team,

I was testing the migration from the Mysql Innodb cluster commercial version to MySQL CE(Community Edition).
While adding the MySQL CE node to the cluster by opting for the option of clone plugin it fails with the below error 

ERROR: The clone process has failed: Clone Donor MySQL version: 8.0.21-commercial is different from Recipient MySQL version 8.0.21. (3864)
Cluster.addInstance: Clone Donor MySQL version: 8.0.21-commercial is different from Recipient MySQL version 8.0.21. (RuntimeError)

Error Log:

2022-10-15T10:34:29.081932Z 32 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2022-10-15T10:34:29.140152Z 32 [System] [MY-013587] [Repl] Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
2022-10-15T10:34:29.489506Z 35 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2022-10-15T10:34:37.634289Z 32 [System] [MY-011511] [Repl] Plugin group_replication reported: 'This server is working as secondary member with primary member address 192.168.56.10:3306.'
2022-10-15T10:34:38.631821Z 0 [Warning] [MY-013469] [Repl] Plugin group_replication reported: 'This member will start distributed recovery using clone. It is due to the number of missing transactions being higher than the configured threshold of 1.'
2022-10-15T10:34:39.681593Z 0 [System] [MY-013471] [Repl] Plugin group_replication reported: 'Distributed recovery will transfer data using: Cloning from a remote group donor.'
2022-10-15T10:34:39.682299Z 0 [System] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to 192.168.56.30:3306, 192.168.56.20:3306, 192.168.56.10:3306 on view 16658272789450654:5.'
2022-10-15T10:34:39.689525Z 45 [System] [MY-011566] [Repl] Plugin group_replication reported: 'Setting super_read_only=OFF.'
2022-10-15T10:34:42.135975Z 45 [ERROR] [MY-011569] [Repl] Plugin group_replication reported: 'Internal query: CLONE INSTANCE FROM 'mysql_innodb_cluster_3'@'192.168.56.10':3306 IDENTIFIED BY '*****' REQUIRE SSL; result in error. Error number: 3864'
2022-10-15T10:34:42.136111Z 44 [ERROR] [MY-013465] [Repl] Plugin group_replication reported: 'There was an issue when cloning from another server: Error number: 3864 Error message: Clone Donor MySQL version: 8.0.21-commercial is different from Recipient MySQL version 8.0.21.'
2022-10-15T10:34:42.684680Z 45 [ERROR] [MY-011569] [Repl] Plugin group_replication reported: 'Internal query: CLONE INSTANCE FROM 'mysql_innodb_cluster_3'@'192.168.56.20':3306 IDENTIFIED BY '*****' REQUIRE SSL; result in error. Error number: 3864'
2022-10-15T10:34:42.684741Z 44 [ERROR] [MY-013465] [Repl] Plugin group_replication reported: 'There was an issue when cloning from another server: Error number: 3864 Error message: Clone Donor MySQL version: 8.0.21-commercial is different from Recipient MySQL version 8.0.21.'
2022-10-15T10:34:42.830595Z 45 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
2022-10-15T10:34:42.830660Z 44 [Warning] [MY-013472] [Repl] Plugin group_replication reported: 'Due to some issue on the previous step distributed recovery is now executing: Incremental Recovery.'
2022-10-15T10:34:43.390532Z 48 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='192.168.56.10', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2022-10-15T10:34:43.539506Z 49 [Warning] [MY-010897] [Repl] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
2022-10-15T10:34:43.686094Z 49 [System] [MY-010562] [Repl] Slave I/O thread for channel 'group_replication_recovery': connected to master 'mysql_innodb_cluster_3@192.168.56.10:3306',replication started in log 'FIRST' at position 4
2022-10-15T10:34:49.038991Z 48 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='192.168.56.10', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2022-10-15T10:34:49.191047Z 0 [System] [MY-011490] [Repl] Plugin group_replication reported: 'This server was declared online within the replication group.'
2022-10-15T10:36:32.834990Z 52 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.

How to repeat:
Adding the MySQL CE node to the commercial InnoDB cluster can help in repeating the bug. 

Suggested fix:
I think this should be documented in the limitation of the clone plugin. 
https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-limitations.html
[17 Oct 2022 9:18] Ceri Williams
Mughees, have you reproduced it with a recent version?

The source code (a246bad7 2022-09-20 09:29:36 +0200 mysql-builder@oracle.com) shows this:

=> sed -n 308,321p sql/server_component/clone_protocol_service.cc
    /* Throw specific error for some configurations. These errors are critical
    because user can no way clone from the current donor. */
    if (config_name.compare("version_compile_os") == 0) {
      critical_error = ER_CLONE_OS;
    } else if (config_name.compare("version") == 0) {
      /* we want to allow to add some suffix to the version and still match
      i.e. 8.0.25 should be the same as 8.0.25-debug */
      if (compare_prefix_version(config_val, donor_val)) {
        continue;
      }
      critical_error = ER_CLONE_DONOR_VERSION;
    } else if (config_name.compare("version_compile_machine") == 0) {
      critical_error = ER_CLONE_PLATFORM;
    }

That is the only place that seems to throw an error for ER_CLONE_DONOR_VERSION
[17 Oct 2022 19:55] MySQL Verification Team
Hi,

I cannot reproduce this with 8.0.31

Please try with 8.0.31
[18 Oct 2022 5:28] Mughees Ahmed
Thanks So what happened is that on the Community version I had MySQL shell with version 8.0.31 and enterprise was 8.0.21 so that's why the clone was not working.

I tested with the same MySQL shell version of 8.0.21 on both sides it automatically pics the incremental sync so it is working fine. 

sorry for wasting your time guys. 

Learned how to come up with better information while reporting a bug. thanks
[18 Oct 2022 8:57] MySQL Verification Team
Hi,

No worries :) Thanks for the update

all best