Skip to content

Commit 4da8bfc

Browse files
yyhenryyyiSecloud
authored andcommitted
fix(mongodb): 迁移元数据修复密码保存 #8129
1 parent 759b705 commit 4da8bfc

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

dbm-ui/backend/flow/engine/bamboo/scene/mongodb/mongodb_install_dbmon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def start(self):
169169
# parse iplist
170170
iplist = self.get_iplist(self.payload["infos"], bk_cloud_id=self.payload["bk_cloud_id"])
171171

172-
add_install_dbmon(self, self.payload, pipeline, iplist, self.payload["bk_cloud_id"])
172+
add_install_dbmon(self.root_id, self.payload, pipeline, iplist, self.payload["bk_cloud_id"])
173173
# 运行流程
174174
pipeline.run_pipeline()
175175

dbm-ui/backend/flow/utils/mongodb/migrate_meta.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def save_app_password(self):
132132
operator="admin",
133133
)
134134
if info != "":
135-
logger.error("user:{} save password to db fail, error:{}".format(user, info))
135+
logger.error("user:{} save password:{} to db fail, error:{}".format(user, self.info[user], info))
136+
return False
136137

137138
def save_password(self):
138139
"""保存密码到密码服务"""
@@ -146,7 +147,12 @@ def save_password(self):
146147
operator=self.info["operator"],
147148
)
148149
if result:
149-
logger.error("save password fail, error: {}".format(result))
150+
logger.error(
151+
"nodes:{} save user:{} password:{} fail, error: {}".format(
152+
password_info["nodes"], username, password_info["password"][username], result
153+
)
154+
)
155+
return False
150156

151157
def change_domain_app(self):
152158
"""修改dns的app字段"""

0 commit comments

Comments
 (0)