From 1fb3b6e6018a8789f85f63c6ed0388254caaa41d Mon Sep 17 00:00:00 2001 From: yyhenryyy Date: Fri, 22 Nov 2024 11:18:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(mongodb):=20=E4=BF=AE=E5=A4=8D=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=AF=86=E7=A0=81=E5=88=B0=E5=AF=86=E7=A0=81=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E6=8A=A5=E9=94=99=E8=8E=B7=E5=8F=96=20#8106?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scene/mongodb/sub_task/migrate_meta.py | 16 ++++++++-------- .../flow/utils/mongodb/mongodb_password.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/migrate_meta.py b/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/migrate_meta.py index e55f174a35..e8b84df818 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/migrate_meta.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/migrate_meta.py @@ -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( @@ -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) diff --git a/dbm-ui/backend/flow/utils/mongodb/mongodb_password.py b/dbm-ui/backend/flow/utils/mongodb/mongodb_password.py index 5c6dc9e345..d749fbf521 100644 --- a/dbm-ui/backend/flow/utils/mongodb/mongodb_password.py +++ b/dbm-ui/backend/flow/utils/mongodb/mongodb_password.py @@ -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 ""