diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_rollback_data_flow.py b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_rollback_data_flow.py index 61c3fb2f44..477b1c1255 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_rollback_data_flow.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_rollback_data_flow.py @@ -200,7 +200,7 @@ def rollback_data_flow(self): # 远程备份+时间 elif self.data["rollback_type"] == RollbackType.REMOTE_AND_TIME.value: - rollback_handler = FixPointRollbackHandler(mycluster["cluster_id"]) + rollback_handler = FixPointRollbackHandler(cluster_class.id) backupinfo = rollback_handler.query_latest_backup_log(str2datetime(mycluster["rollback_time"])) if backupinfo is None: logger.error("cluster {} backup info not exists".format(mycluster["cluster_id"])) @@ -342,7 +342,7 @@ def rollback_to_cluster_flow(self): act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict(exec_act_kwargs), ) - # todo 屏蔽监控,停止从库备份 + # 屏蔽监控,停止从库备份 rollback_pipeline.add_act( act_name=_("屏蔽监控 {}").format(rollback_storage.ip_port), act_component_code=MysqlCrondMonitorControlComponent.code, @@ -396,7 +396,7 @@ def rollback_to_cluster_flow(self): # 远程备份+时间 elif self.data["rollback_type"] == RollbackType.REMOTE_AND_TIME.value: - rollback_handler = FixPointRollbackHandler(mycluster["cluster_id"]) + rollback_handler = FixPointRollbackHandler(cluster_class.id) backupinfo = rollback_handler.query_latest_backup_log(str2datetime(mycluster["rollback_time"])) if backupinfo is None: logger.error("cluster {} backup info not exists".format(mycluster["cluster_id"])) @@ -440,7 +440,6 @@ def rollback_to_cluster_flow(self): "change_master_type": MysqlChangeMasterType.MASTERSTATUS.value, "change_master_force": True, } - # 获取位点信息 exec_act_kwargs.cluster = copy.deepcopy(repl_cluster) exec_act_kwargs.exec_ip = repl_master.ejector.machine.ip exec_act_kwargs.job_timeout = MYSQL_USUAL_JOB_TIME @@ -453,7 +452,6 @@ def rollback_to_cluster_flow(self): kwargs=asdict(exec_act_kwargs), write_payload_var="show_master_status_info", ) - # 启动,或者建立组从关系 exec_act_kwargs.exec_ip = rollback_storage.machine.ip exec_act_kwargs.get_mysql_payload_func = MysqlActPayload.tendb_remotedb_change_master.__name__ rollback_pipeline.add_act( 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 b89c933da0..4047f3a6cc 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 @@ -240,7 +240,7 @@ def remote_node_rollback(root_id: str, ticket_data: dict, cluster: dict): } repl_exec_act_kwargs = ExecActuatorKwargs( bk_cloud_id=cluster["bk_cloud_id"], - cluster_type=ClusterType.TenDBHA, + cluster_type=ClusterType.TenDBCluster, cluster=copy.deepcopy(repl_cluster), job_timeout=MYSQL_USUAL_JOB_TIME, )