This topic describes how to upgrade OceanBase Database Proxy (ODP) on a specified node by using obshell-sdk-python.
Note
This API is supported starting with obshell V4.2.6.
Considerations
Make sure that obshell is running normally.
Make sure that ODP is deployed on the node corresponding to the client.
Sample code
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance. The node address is '10.10.10.1', the port is 2886, and the agent password is '***'.
client = ClientSet("10.10.10.1", 2886, PasswordAuth(agent_password='***'))
client.v1.upgrade_obproxy_sync(
version='4.3.3.0', release='5.el7')
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance. The node address is '10.10.10.1', the port is 2886, and the agent password is '***'.
client = ClientSet("10.10.10.1", 2886, PasswordAuth(agent_password='***'))
dag = client.v1.upgrade_obproxy(version='4.3.3.0', release='5.el7')
# Wait for the task to complete.
client.v1.wait_dag_succeed(dag.generic_id)
References
For more information about the API for upgrading ODP, see Upgrade ODP.