From 09379d4699fed61a532547e79ab4c2a5d925be6d Mon Sep 17 00:00:00 2001 From: zfrendo <842557664@qq.com> Date: Thu, 19 Sep 2024 16:18:40 +0800 Subject: [PATCH] =?UTF-8?q?style:=20tendbHa=E6=95=B0=E6=8D=AE=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E6=B5=81=E7=A8=8B=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=83=E6=95=B0=E6=8D=AE=20#6973?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/db_meta/api/cluster/tendbha/switch_storage.py | 2 +- .../bamboo/scene/mysql/mysql_migrate_cluster_remote_flow.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbm-ui/backend/db_meta/api/cluster/tendbha/switch_storage.py b/dbm-ui/backend/db_meta/api/cluster/tendbha/switch_storage.py index 65e61f05e1..f18a701f91 100644 --- a/dbm-ui/backend/db_meta/api/cluster/tendbha/switch_storage.py +++ b/dbm-ui/backend/db_meta/api/cluster/tendbha/switch_storage.py @@ -34,7 +34,7 @@ def switch_storage(cluster_id: int, target_storage_ip: str, origin_storage_ip: s ) cluster.storageinstance_set.remove(origin_storage) target_storage.status = InstanceStatus.RUNNING.value - if role and target_storage == InstanceRole.BACKEND_REPEATER: + if role and target_storage.instance_role == InstanceRole.BACKEND_REPEATER.value: # 如果是REPEATER角色,改成传入的role变量 target_storage.instance_role = role target_storage.instance_inner_role = InstanceRoleInstanceInnerRoleMap[role].value diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_migrate_cluster_remote_flow.py b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_migrate_cluster_remote_flow.py index 04bb1f82d6..329da94339 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_migrate_cluster_remote_flow.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_migrate_cluster_remote_flow.py @@ -329,7 +329,7 @@ def migrate_cluster_flow(self, use_for_upgrade=False): ) ) switch_sub_pipeline.add_act( - act_name=_("集群切换完成,写入 {} 的元信息".format(cluster_model.id)), + act_name=_("集群切换完成,写入 {} 的元信息".format(cluster_model.name)), act_component_code=MySQLDBMetaComponent.code, kwargs=asdict( DBMetaOPKwargs( @@ -340,7 +340,7 @@ def migrate_cluster_flow(self, use_for_upgrade=False): ), ) switch_sub_pipeline_list.append( - switch_sub_pipeline.build_sub_process(sub_name=_("集群 {} 切换".format(cluster_model.id))) + switch_sub_pipeline.build_sub_process(sub_name=_("集群 {} 切换".format(cluster_model.name))) ) # 第四步 卸载实例 uninstall_svr_sub_pipeline_list = []