[MDEV-28302] Feature request: configurable defaults for MASTER_SSL_* settings for CHANGE MASTER Created: 2022-04-12 Updated: 2023-11-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Replication, SSL |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | Andrei Elkin |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
When having multiple replication channels (or when changing what primary to replicate from often) and using two-way TLS the client certificate and CA files used as MASTER_SSL_* parameters in CHANGE MASTER TO will usually be the same and not change between connections to different primaries. So it may make sense to be able to configure a client certificate to be used for all replication channels in a central place instead of having to add MASTER_SSL_CA, MASTER_SSL_CERT and MASTER_SSL_KEY (and maybe MASTER_SSL_VERIFY_SERVER_CERT, too) again and again each time a CHANGE MASTER TO is done. E.g.:
and maybe also an explicit MASTER_SSL_USE_DEFAULTS option to CHANGE MASTER to only use such default settings on demand. |
| Comments |
| Comment by Andrei Elkin [ 2022-06-13 ] | ||||||||||||||||||||||||||
|
hholzgra, to a beyond new global var alternative, like yours
how would look to you the following syntax form
so the default configuration for a new connection 'new_connection' would be first copied from 'default_connection' "parent" and | ||||||||||||||||||||||||||
| Comment by Hartmut Holzgraefe [ 2022-09-05 ] | ||||||||||||||||||||||||||
|
That might work, too. Advantage would be that no additional config settings are needed. Disadvantage may be that some individual settings might get inadvertently, e.g. we might want to exclude log file and position from being copied ... | ||||||||||||||||||||||||||
| Comment by Michael Widenius [ 2023-11-06 ] | ||||||||||||||||||||||||||
|
How about having all the options to CHANGE MASTER also as user variables set in my.cnf (with a MASTER_ prefix for all options). combining this with LIKE 'default_connection' would be powerful. The problem with default_connection is that in this case we need a way to disable some options that should not be set (like disabling SSL). | ||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2023-11-08 ] | ||||||||||||||||||||||||||
|
it doesn't make much sense to have defaults for all options, in fact it'll be more error prone to do that. The list of options (according to KB) is
Out of these, MASTER_CONNECT_RETRY, MASTER_HEARTBEAT_PERIOD, MASTER_SSL*, MASTER_USE_GTID look like one might want to have the same value for them over all masters in a multi-master replication. So they would benefit from global server-wide defaults. |