From 9e1acb76e6c2a22b955a70e1d3f4ae649bf0ad95 Mon Sep 17 00:00:00 2001 From: iSecloud <869820505@qq.com> Date: Tue, 15 Oct 2024 11:26:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20tendbcluster=E5=AE=9E=E4=BE=8B?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=BF=87=E6=BB=A4=E6=8A=A5=E9=94=99=20#7347?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/db_services/mysql/cluster/handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbm-ui/backend/db_services/mysql/cluster/handlers.py b/dbm-ui/backend/db_services/mysql/cluster/handlers.py index 7d2068b0c3..15994ca736 100644 --- a/dbm-ui/backend/db_services/mysql/cluster/handlers.py +++ b/dbm-ui/backend/db_services/mysql/cluster/handlers.py @@ -12,7 +12,7 @@ from collections import defaultdict from typing import Any, Dict, List -from django.db.models import Q +from django.db.models import Q, Value from django.db.models.query import QuerySet from django.forms import model_to_dict @@ -170,6 +170,7 @@ def _get_instance_objs(self, instances: List[DBInstance]): Q(machine__bk_host_id__in=bk_host_ids) & Q(tendbclusterspiderext__spider_role=TenDBClusterSpiderRole.SPIDER_MASTER.value) ) + .annotate(role=Value("spider_ctl")) ) # 覆写port为admin port for instance in controller_instances: