From adf0c2a3b1bf8054b2b8c0cb9991000ca082c3f0 Mon Sep 17 00:00:00 2001 From: zfrendo <842557664@qq.com> Date: Wed, 4 Dec 2024 15:50:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9A=E7=82=B9=E5=9B=9E=E6=A1=A3?= =?UTF-8?q?=E7=89=A9=E7=90=86=E5=A4=87=E4=BB=BDchangeMasterTEST=20#8338?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/configuration/constants.py | 2 +- .../flow/engine/bamboo/scene/spider/spider_recover.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dbm-ui/backend/configuration/constants.py b/dbm-ui/backend/configuration/constants.py index c493504c0b..628cca4153 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/flow/engine/bamboo/scene/spider/spider_recover.py b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_recover.py index 4f179857ed..ffe5de6fd7 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_recover.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_recover.py @@ -156,7 +156,8 @@ def remote_node_rollback(root_id: str, ticket_data: dict, cluster: dict): sub_pipeline = SubBuilder(root_id=root_id, data=ticket_data) exec_act_kwargs = ExecActuatorKwargs( - bk_cloud_id=int(cluster["bk_cloud_id"]), cluster_type=ClusterType.TenDBCluster, cluster=cluster + bk_cloud_id=int(cluster["bk_cloud_id"]), cluster_type=ClusterType.TenDBCluster, + cluster=copy.deepcopy(cluster) ) exec_act_kwargs.get_mysql_payload_func = MysqlActPayload.mysql_mkdir_dir.__name__ exec_act_kwargs.exec_ip = cluster["rollback_ip"] @@ -227,6 +228,8 @@ def remote_node_rollback(root_id: str, ticket_data: dict, cluster: dict): # 针对slave repeater角色的从库。建立复制链路。重置slave>添加复制账号和获取位点>建立主从关系 sub_pipeline_all.add_parallel_sub_pipeline(sub_pipeline_all_list) backup_type = backup_info.get("backup_type", "") + # todo 测试用 + backup_type = MySQLBackupTypeEnum.PHYSICAL.value # repl_pipeline_list = [] if cluster["new_master"]["instance"] != cluster["new_slave"]["instance"]: # repl_pipeline = SubBuilder(root_id=root_id, data=copy.deepcopy(ticket_data))