diff --git a/dbm-ui/backend/configuration/constants.py b/dbm-ui/backend/configuration/constants.py index 0b8a8824bf..83c6de98fa 100644 --- a/dbm-ui/backend/configuration/constants.py +++ b/dbm-ui/backend/configuration/constants.py @@ -20,7 +20,7 @@ # sqlserver的用户登录admin账号名称 SQLSERVER_ADMIN_USER = "dbm_admin" # TODO: job超时时间最大为86400,后续考虑让job平台调大限制 -MYSQL_DATA_RESTORE_TIME = 259200 +MYSQL_DATA_RESTORE_TIME = 86400 MYSQL_USUAL_JOB_TIME = 7200 MYSQL8_VER_PARSE_NUM = 8000000 diff --git a/dbm-ui/backend/db_meta/api/cluster/tendbha/storage_tuple.py b/dbm-ui/backend/db_meta/api/cluster/tendbha/storage_tuple.py index 9fc7bb1a82..b4935709a9 100644 --- a/dbm-ui/backend/db_meta/api/cluster/tendbha/storage_tuple.py +++ b/dbm-ui/backend/db_meta/api/cluster/tendbha/storage_tuple.py @@ -38,7 +38,7 @@ def remove_storage_tuple(master_ip: str, slave_ip: str, bk_cloud_id: int, port_l @transaction.atomic -def update_storage_tuple(master_ip: str, new_master_ip: str, exclude_ip: list, bk_cloud_id: int, port_list: list): +def update_storage_tuple(master_ip: str, new_master_ip: str, exclude_ips: list, bk_cloud_id: int, port_list: list): for port in port_list: master_storage = StorageInstance.objects.get( machine__ip=master_ip, port=port, machine__bk_cloud_id=bk_cloud_id @@ -47,5 +47,5 @@ def update_storage_tuple(master_ip: str, new_master_ip: str, exclude_ip: list, b machine__ip=new_master_ip, port=port, machine__bk_cloud_id=bk_cloud_id ) StorageInstanceTuple.objects.filter(ejector=master_storage).exclude( - receiver__machine__ip__in=exclude_ip + receiver__machine__ip__in=exclude_ips ).update(ejector=new_master_storage) diff --git a/dbm-ui/backend/flow/utils/mysql/mysql_db_meta.py b/dbm-ui/backend/flow/utils/mysql/mysql_db_meta.py index 1ae0c6f602..d23a2b8827 100644 --- a/dbm-ui/backend/flow/utils/mysql/mysql_db_meta.py +++ b/dbm-ui/backend/flow/utils/mysql/mysql_db_meta.py @@ -537,7 +537,7 @@ def mysql_migrate_cluster_switch_storage(self): api.cluster.tendbha.storage_tuple.update_storage_tuple( master_ip=self.cluster["old_master_ip"], new_master_ip=self.cluster["new_master_ip"], - exclude_ip=[self.cluster["old_master_ip"], self.cluster["old_slave_ip"]], + exclude_ips=[self.cluster["old_master_ip"], self.cluster["old_slave_ip"]], bk_cloud_id=self.cluster["bk_cloud_id"], port_list=[self.cluster["mysql_port"]], )