-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-14034][PLAT-14762] Support TLS for db scoped replication
Summary: Allow users to set up db scoped xCluster replication with TLS enabled on both source and target universes. Certificates will now be transferred bidirectionally. ie. Instead of only the source universe certificates being copied to the target nodes at by default: `{yb-home-dir}/yugabyte-tls-producer/{replication-group-name}/ca.crt`. We also copy the target universe's certificate to the same directory for the source universe's node. Also, any new addition of nodes during add node task, edit universe actions, and certain rolling upgrades will be handled to ensure any new nodes or re-provisioned nodes will have the correct certificates if db scoped xcluster replication is configured. Test Plan: Added local provider test which creates 2 rf1 one node universes with TLS enabled. DB scoped replication is then set up and full move is performed on both the source and target universes. Assertions are made between these tasks to ensure that the replication is working successfully. Manual testing: Create any number of nodes, two rf3 universe with TLS enabled. 1. Create a bunch of tables on both universes: ``` -- Connect to colocated db \c col_true_db -- Create colocated tables. CREATE TABLE COMPANY( ID INT PRIMARY KEY NOT NULL, NAME TEXT NOT NULL ) with (COLOCATION_ID = 20000); -- Create index in colocated table create index on company(id) with (COLOCATION_ID = 20002); -- Create table with colocation = false. CREATE TABLE NOTCOLOCATEDTABLE( ID INT PRIMARY KEY NOT NULL, NAME TEXT NOT NULL ) with (colocation=false); create index on notcolocatedtable(id); -- Connect to non-colocated db \c non_colocated_db -- Create normal tables. CREATE TABLE house( ID INT PRIMARY KEY NOT NULL, LOCATION TEXT NOT NULL ); CREATE TABLE ROOM( ID INT PRIMARY KEY NOT NULL, size TEXT NOT NULL ); create index on house(id); ``` 2. Create db scoped xcluster DR from the UI. 3. Perform switchover. 4. Perform failover + repair 5. Perform full move on both source + target universe. 6. Validate for each step from 2 - 5 that replication works as expected by performing insertions. For example: `insert into company (id, name) values (1, 'yugabyte');` Reviewers: hzare, jmak, sanketh, spothuraju, amindrov Reviewed By: hzare Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D36870
- Loading branch information
1 parent
927a0f9
commit ef62972
Showing
18 changed files
with
417 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.