From 21151b8d5234c7d77275436a6cd42b919be45b2d Mon Sep 17 00:00:00 2001 From: yyhenryyy Date: Fri, 18 Oct 2024 15:05:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(mongodb):=20mongos=E8=87=AA=E6=84=88?= =?UTF-8?q?=EF=BC=8Cmongo=E5=AE=9E=E4=BE=8B=E4=B8=8B=E6=9E=B6=20#7010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scene/mongodb/sub_task/cluster_monogs_autofix.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/cluster_monogs_autofix.py b/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/cluster_monogs_autofix.py index 2320b6c3ec..5566d9949d 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/cluster_monogs_autofix.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mongodb/sub_task/cluster_monogs_autofix.py @@ -58,6 +58,16 @@ def mongos_autofix(root_id: str, ticket_data: Optional[Dict], sub_sub_kwargs: Ac sub_sub_get_kwargs.mongos_info["conf_set_id"] = sub_sub_get_kwargs.get_config_set_name_replace( cluster_id=cluster_id ) + # 获取db版本 + db_version = sub_sub_get_kwargs.db_instance["db_version"] + # db大版本 + sub_sub_get_kwargs.db_main_version = str(db_version.split("-")[1].split(".")[0]) + # db发行版本 + sub_sub_get_kwargs.db_release_version = db_version + # db发行 + sub_sub_get_kwargs.db_release = db_version.split("-")[0] + # db版本 + sub_sub_get_kwargs.payload["db_version"] = db_version.split("-")[1] sub_sub_get_kwargs.cluster_type = ClusterType.MongoShardedCluster.value sub_sub_get_kwargs.payload["key_file"] = sub_sub_get_kwargs.get_conf( cluster_name=sub_sub_get_kwargs.db_instance["cluster_name"]