Skip to content

Commit

Permalink
feat(mongodb): mongos自愈,mongo实例下架 TencentBlueKing#7010
Browse files Browse the repository at this point in the history
  • Loading branch information
yyhenryyy committed Oct 18, 2024
1 parent 24635a9 commit 21151b8
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 21151b8

Please sign in to comment.