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 d338519 commit 5387996
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def mongo_create_ticket(cluster: RedisAutofixCore, cluster_ids: list, mongos_lis
cluster_type = mongod_list[0]["cluster_type"]
# 单据信息
details = {
"bk_biz_id": cluster.bk_biz_id,
"ip_source": IpSource.RESOURCE_POOL.value,
"infos": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from backend.db_meta.enums import ClusterType
from backend.flow.utils.mongodb.mongodb_repo import MongoRepository
from backend.db_meta.models import AppCache

from . import mongodb_cluster_autofix
from . import mongodb_replace
Expand Down Expand Up @@ -41,6 +42,7 @@ def get_public_data(self) -> Dict:
return {
"bk_biz_id": bk_biz_id,
"uid": self.data["uid"],
"bk_app_abbr": AppCache.objects.get(bk_biz_id=bk_biz_id).db_app_abbr,
"created_by": self.data["created_by"],
"ticket_type": self.data["ticket_type"],
"infos": {"MongoReplicaSet": [], "MongoShardedCluster": []},
Expand Down
2 changes: 0 additions & 2 deletions dbm-ui/backend/ticket/builders/mongodb/mongo_autofix.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
BaseMongoDBOperateResourceParamBuilder,
BaseMongoShardedTicketFlowBuilder,
)
from backend.ticket.builders.mongodb.mongo_backup import MongoDBBackupFlowParamBuilder
from backend.ticket.constants import TicketType


Expand All @@ -42,7 +41,6 @@ class HostInfoSerializer(serializers.Serializer):
ip_source = serializers.ChoiceField(
help_text=_("主机来源"), choices=IpSource.get_choices(), default=IpSource.RESOURCE_POOL
)
bk_biz_id = serializers.IntegerField(help_text=_("业务ID"))
infos = serializers.ListSerializer(help_text=_("mongo自愈申请信息"), child=AutofixDetailSerializer())


Expand Down

0 comments on commit 5387996

Please sign in to comment.