Bug #105698 Improve clone_valid_donor_list flexibility: add wildcard support
Submitted: 24 Nov 2021 12:46 Modified: 24 Nov 2021 13:14
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Clone Plugin Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[24 Nov 2021 12:46] Simon Mudd
clone_valid_donor_list takes a list of host:port. It also has a length limit which you won't fix in https://bugs.mysql.com/bug.php?id=100363 so we might not be able to configure all the require sources if the cluster is large.  Also having to maintain that list is already tiresome and unneeded.

In the end if I want to clone from hostX:1234 then why on earth do you prevent me doing that? I assume this might be intended as a security measure but if I have rights to clone I probably can also change the clone_valid_donor_list setting anyway.

Basically this is messy for any large cluster of hundreds of MySQL servers.

So simplify the clone_valid_donor_list settings for the user.

How to repeat:
I've seen many issues when doing "adhoc cloning" of the form:

WARNING MySQL Native Cloning failed: <(3869, 'Clone system configuration: host-8016.example.com:3306 is not found in clone_valid_donor_list: host-6001.example.com:3306,host-6002.example.com:3306,...

If I issue the clone command why do I have to have already pre-configured clone_valid_donor_list to match?

Suggested fix:
Three simple fixes just simplify usage and make life easier.

1. Make the port number optional when running the CLONE INSTANCE command and use 3306 as the default.
2. Make the port number optional in clone_valid_donor_list using port 3306 if not defined.
3. Provide a wild-card option in clone_valid_donor_list, similar to what is used in MySQL usernames. e.g. 10.%,172.16.%,10.1.2.% or similar.  This allows the networks where sources are known to exist to be provided in a much shorter format. Existing mysqld code can handle this type of wildcard already so extend it to be used here.

An example might be in /etc/my.cnf
with a similar equivalent string of "10.%,11.%:3307,172.16.%:9999" as a global variable.
[24 Nov 2021 12:48] Simon Mudd
Related to:
- bug#100363
- bug#103206
[24 Nov 2021 13:14] MySQL Verification Team
Hello Simon,

Thank you for the feature request!