Bug #100244 Cloning isn't handing plugins very well.
Submitted: 17 Jul 2020 8:00 Modified: 24 Aug 2020 12:09
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S2 (Serious)
Version:8.0.21, 8.0.17 OS:Any
Assigned to: CPU Architecture:Any
Tags: plugins, usability

[17 Jul 2020 8:00] Daniël van Eeden
Description:
When trying "CLONE INSTANCE FROM..." it first failed with:
ERROR 3870 (HY000): Clone Donor plugin rpl_semi_sync_master is not active in Recipient.

Then I loaded the semisync master plugin and tried again:
ERROR 3870 (HY000): Clone Donor plugin rpl_semi_sync_slave is not active in Recipient.

Then I loaded the semisync slave plugin and tried again:
ERROR 3870 (HY000): Clone Donor plugin my_custom_plugin is not active in Recipient.

As the my_custom_plugin wasn't available on the Recipient I tried to unload it on the Donor. This succeeded but it was still listed as "PLUGIN_STATUS: DELETED" in information_schema.plugins. But "CLONE INSTANCE FROM" kept complaining about it until I restarted the Donor instance without this plugin loaded.

How to repeat:
Use "CLONE INSTANCE FROM..." on a vanilla/empty MySQL instance and with a Donor that has semisync master, semisync slave and one or more custom plugins loaded.

Suggested fix:
1. Compare and report on the full list of plugin differences on donor and recipient, not just on the first failure.

2. Maybe try to auto load the plugins? This would work for semisync. Maybe an allowlist for bundled plugins? (semisync, mysqlx, commercial ones). Just get the list of plugins and sonames from the donor and use these.

3. Don't fail on inactive/uninstalled/deleted plugins.
[19 Jul 2020 6:17] MySQL Verification Team
Hello Daniël,

Thank you for the report and feedback.
Verified as described.

regards,
Umesh
[24 Aug 2020 12:09] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.22 release, and here's the proposed changelog entry from the documentation team:

A remote cloning operation checked for the availability of a plugin on
the recipient that was removed from the donor instance previously.
References to the uninstalled plugin had not been released. Error
reporting issues related to plugin mismatches and availability were also
addressed.