From 90c1b50d0dbae4f0daac120c5e201f2ff6afee29 Mon Sep 17 00:00:00 2001 From: yyhenryyy Date: Fri, 22 Nov 2024 18:59:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(mongodb):=20=E8=BF=81=E7=A7=BB=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BF=AE=E5=A4=8D=E5=AF=86=E7=A0=81=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=20#8129?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bamboo/scene/mongodb/mongodb_install_dbmon.py | 2 +- dbm-ui/backend/flow/utils/mongodb/migrate_meta.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/mongodb_install_dbmon.py b/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/mongodb_install_dbmon.py index f8f0cff692..b2b525ff34 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/mongodb_install_dbmon.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/mongodb_install_dbmon.py @@ -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() diff --git a/dbm-ui/backend/flow/utils/mongodb/migrate_meta.py b/dbm-ui/backend/flow/utils/mongodb/migrate_meta.py index 8afcea45f8..91b66f5791 100644 --- a/dbm-ui/backend/flow/utils/mongodb/migrate_meta.py +++ b/dbm-ui/backend/flow/utils/mongodb/migrate_meta.py @@ -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): """保存密码到密码服务""" @@ -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字段"""