Skip to content

Commit

Permalink
fix(mongodb): 迁移元数据修复密码保存 TencentBlueKing#8129
Browse files Browse the repository at this point in the history
  • Loading branch information
yyhenryyy committed Nov 22, 2024
1 parent e399964 commit 90c1b50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def start(self):
# parse iplist
iplist = self.get_iplist(self.payload["infos"], bk_cloud_id=self.payload["bk_cloud_id"])

add_install_dbmon(self, self.payload, pipeline, iplist, self.payload["bk_cloud_id"])
add_install_dbmon(self.root_id, self.payload, pipeline, iplist, self.payload["bk_cloud_id"])
# 运行流程
pipeline.run_pipeline()

Expand Down
10 changes: 8 additions & 2 deletions dbm-ui/backend/flow/utils/mongodb/migrate_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def save_app_password(self):
operator="admin",
)
if info != "":
logger.error("user:{} save password to db fail, error:{}".format(user, info))
logger.error("user:{} save password:{} to db fail, error:{}".format(user, self.info[user], info))
return False

def save_password(self):
"""保存密码到密码服务"""
Expand All @@ -146,7 +147,12 @@ def save_password(self):
operator=self.info["operator"],
)
if result:
logger.error("save password fail, error: {}".format(result))
logger.error(
"nodes:{} save user:{} password:{} fail, error: {}".format(
password_info["nodes"], username, password_info["password"][username], result
)
)
return False

def change_domain_app(self):
"""修改dns的app字段"""
Expand Down

0 comments on commit 90c1b50

Please sign in to comment.