Environment
- Yugabyte DB - YSQL
Issue
After upgrading a universe from 2.8.X to 2.12.X, xCluster replication status is no longer displayed in the Yugabyte Platform UI replication tab.
Resolution
After a Yugabyte Platform upgrade to 2.12+, you will need to run the xCluster sync config API call.
Before doing that, however, ensure your replication streams have been named according to the correct format. In YB 2.12+ the Platform API has an endpoint available for xCluster operations and interaction. This new design feature will help manage xCluster activities and operations, but it also has some constraints that were not in place if you created your xCluster setup via yb-admin. Any stream not following the defined format will not be identified as something to be tracked.
Note: It is recommended to use the Yugabyte Platform UI functionality to set up xCluster replication instead of the yb-admin command after 2.12+.
1. Check that the replication streams have the correct naming convention.
If the xCluster replication was set up using yb-admin, the replication stream likely does not have the correct naming convention which should match: <source/producer_universe_uuid>_<config_name> .
Check the replication group names with the following:
yb-admin get_universe_config | python -m json.tool
example:
"producerMap": {
"04dfc615-e2bd-4e56-9a3b-198bceb09e43": {
"consumerTableId": "5dc1a75bced7465fa298ab3a6fea970b",
"producerTableId": "ec26089a41f24d4080cc84b71c6c3391",
Note: `producerMap` shows the existing stream name. This is needed. In above example 04dfc615-e2bd-4e56-9a3b-198bceb09e43
2. Fix any replication group names as needed.
Run the following, replacing the current_group name with the new_group name, following the naming convention as mentioned above.
yb-admin alter_universe_replication <existing_stream_name> rename_id <producer_universe_id>_<existing_stream_name>
3. Verify all replication group names are in the correct format.
Verify the replication group names with the following:
yb-admin get_universe_config | python -m json.tool
4. Sync the xcluster config.
Run the API command as shown in this API doc:
https://api-docs.yugabyte.com/docs/yugabyte-platform/e19b528a55430-sync-xcluster-config
Be sure to add the target/consumer UUID in the URL and add an empty data flag. For example:
curl --location --request POST 'http://<IP_address>:9000/api/v1/customers/<universe_UUID>/xcluster_configs/sync?targetUniverseUUID=<consumer_universe_UUID>' \ --header 'X-AUTH-YW-API-TOKEN: <your_API_token>' \ --data-raw ''
Comments
0 comments
Please sign in to leave a comment.