Skip to content

Commit

Permalink
style: tendbHa数据恢复流程代码优化修复元数据 #6973
Browse files Browse the repository at this point in the history
  • Loading branch information
zfrendo committed Sep 19, 2024
1 parent 7eba6d5 commit 09379d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 = []
Expand Down

0 comments on commit 09379d4

Please sign in to comment.