Skip to content

Commit

Permalink
fix(mongodb): 修复保存密码到密码服务的报错获取 TencentBlueKing#8106
Browse files Browse the repository at this point in the history
  • Loading branch information
yyhenryyy committed Nov 22, 2024
1 parent 25299a7 commit 1fb3b6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ def cluster_migrate(
kwargs = sub_get_kwargs.get_dba_info()
sub_pipeline.add_act(act_name=_("更新dba"), act_component_code=MongoDBMigrateMetaComponent.code, kwargs=kwargs)

# 迁移数据
kwargs = sub_get_kwargs.get_migrate_info()
sub_pipeline.add_act(
act_name=_("迁移meta"),
act_component_code=ExecAddRelationshipOperationComponent.code,
kwargs=kwargs,
)

# 相同业务的appdba appmonitor是一致的,以业务为维度保存appdba appmonitor密码到密码服务
kwargs = sub_get_kwargs.get_save_app_password_info()
sub_pipeline.add_act(
Expand All @@ -87,6 +79,14 @@ def cluster_migrate(
kwargs = sub_get_kwargs.get_save_password_info()
sub_pipeline.add_act(act_name=_("保存密码"), act_component_code=MongoDBMigrateMetaComponent.code, kwargs=kwargs)

# 迁移数据
kwargs = sub_get_kwargs.get_migrate_info()
sub_pipeline.add_act(
act_name=_("迁移meta"),
act_component_code=ExecAddRelationshipOperationComponent.code,
kwargs=kwargs,
)

# 修改dns的app字段
kwargs = sub_get_kwargs.get_change_dns_app_info()
sub_pipeline.add_act(act_name=_("更新dns的app"), act_component_code=MongoDBMigrateMetaComponent.code, kwargs=kwargs)
Expand Down
2 changes: 1 addition & 1 deletion dbm-ui/backend/flow/utils/mongodb/mongodb_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def save_password_to_db(self, instances: list, username: str, password: str, ope
raw=True,
)
if result["code"] != RequestResultCode.Success.value:
return result["message"] + " " + result["data"]
return result["message"]
else:
return ""

Expand Down

0 comments on commit 1fb3b6e

Please sign in to comment.