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 = []