This topic describes how to take over an OBProxy from another OCP cluster and manage it in the current OCP cluster. An OBProxy not managed in the current OCP cluster is called an OBProxy to be taken over. The OBProxy cluster to which the OBProxy to be taken over is to be connected is called the target OBProxy cluster. After an OBProxy is connected to the target OBProxy cluster, it is managed in the current OCP cluster.
Note
When an OBProxy is taken over, it will be restarted. Restarting an OBProxy will affect business connections. Proceed with caution.
Prerequisites
The user who is logged in to the OCP console must have the following permissions:
- The OBProxy Maintenance resource permission.
- The Overview menu permission.
The OBProxy to be managed must meet the following conditions:
The version is V1.8.0 or later.
It is installed by using the RPM package.
The host on which the OBProxy is deployed has only this OBProxy process.
It is accessible over the network of OCP.
The host is added to OCP. For more information, see Add a host.
There is an OBProxy cluster that meets the conditions in the current OCP instance.
The OBProxy cluster that meets the conditions must meet the following two conditions:
The Startup Method of the OBProxy cluster is the same as that of the OBProxy to be managed.
For example, if the startup mode of the OBProxy cluster is ConfigUrl, the startup mode of the OBProxy to be managed must also be ConfigUrl.
The OceanBase clusters that can be connected to the OBProxy cluster are a superset of those that can be connected to the OBProxy to be managed.
If the startup mode of the OBProxy to be managed is ConfigUrl, the OceanBase clusters that can be connected to the OBProxy to be managed must be included in the OceanBase clusters that can be connected to the OBProxy cluster.
If the startup mode of the OBProxy to be managed is RsList, the OceanBase clusters that can be connected to the OBProxy to be managed must be exactly the same as those that can be connected to the OBProxy cluster.
If no OBProxy cluster that meets the conditions exists in the current OCP instance, create an empty OBProxy cluster that meets the conditions. For more information, see Create an OBProxy cluster.
If the current OBProxy cluster is V4.0 or later, it can only manage OBProxies of V4.0.0 or later. If the current OBProxy cluster is V3.x or earlier, it can only manage OBProxies of V1.8 or later but earlier than V4.0.0.
Procedure
You can take over an OBProxy from the following two entry points:
- Method 1: On the Clusters page of the OBProxy, find the cluster that can take over the OBProxy and click Take over OBProxy in the Actions column.
- Method 2: On the Clusters page, click the name of the cluster that can take over the OBProxy to go to the Overview page of the OBProxy. Then, click Take over OBProxy in the upper-right corner of the page.
The following steps use Entry 2 as an example:
Log in to the OCP console.
In the left-side navigation pane, click OBProxy.
On the Clusters page, click the name of the cluster that can take over the OBProxy to go to the Overview page of the OBProxy.
Click Take over OBProxy to go to the Take over OBProxy page.
On the Take over OBProxy page, select the host where the OBProxy to be taken over is located.
Parameter Description root@proxysys Password The password of the OBProxy administrator. This parameter is optional. If you have not changed the root@proxysys password of the OBProxy to be taken over, you can leave this parameter empty. Note
If you are to take over multiple OBProxies, we recommend that you group OBProxies with the same root@proxysys password and take them over in batches if their passwords are different.
IDC The IDC where the OBProxy is located. An OBProxy can only be located in one IDC. Host Type The model of the host. This parameter is optional. If you specify a model, the host list will be filtered based on the model. Host The host where the OBProxy is located. SQL Port The SQL port of the host where the OBProxy is located. Load Balancing Configuration The load balancing configuration. This parameter is optional. You can manually enter the configuration or import the configuration. The following figure shows the details. - Click OBLB to manually enter the load balancing service information. For more information, see Manage load balancing.
- Click Import on the right to upload the load balancer data file exported when you migrated the OBProxy cluster. OCP will automatically fill in the load balancing information from the file. For more information, see Migrate an OBProxy cluster.
Click Next. The system performs a precheck on the OBProxy to be taken over and displays the check result on the precheck page.
If the precheck fails for any OBProxy, you cannot take over the OBProxy. You can:
Delete the OBProxies that failed the precheck and take over only the OBProxies that passed the precheck.
Hover the pointer over Cause of Failure in the Result column to view the reason for the failed precheck. After you fix the issue, click Recheck.
If the precheck passes for all OBProxies, you can perform step 7.
Click Take Over All. The OBProxy takeover information is displayed in the Takeover Confirmation panel.
If the OBProxy to be taken over can connect to an OceanBase cluster, the OceanBase cluster that can be connected to the OBProxy will be synchronized and added to the OBProxy cluster.
If the parameters of the OBProxy located on the host are inconsistent with those of the OBProxy cluster, you cannot take over the OBProxy. You must agree to modify the OBProxy parameters. After you click Modify, all parameters of the OBProxy located on the host will be modified to be consistent with those of the OBProxy cluster.
In the takeover dialog box, enter confirm and click Confirm Takeover to submit the takeover task.
After the takeover task is completed, the OBProxy is taken over.
Note
To facilitate management, after the target OBProxy is taken over, its root@proxysys password will be unified with that of the OBProxy cluster to which it belongs.