diff --git a/dbm-ui/backend/db_services/cmdb/biz.py b/dbm-ui/backend/db_services/cmdb/biz.py index 214c434f74..56f83bfbb3 100644 --- a/dbm-ui/backend/db_services/cmdb/biz.py +++ b/dbm-ui/backend/db_services/cmdb/biz.py @@ -12,7 +12,6 @@ import logging from typing import List -from backend import env from backend.components import CCApi from backend.db_meta.models import AppCache, DBModule from backend.db_services.cmdb.exceptions import BkAppAttrAlreadyExistException @@ -138,7 +137,7 @@ def get_or_create_cmdb_module_with_name(bk_biz_id: int, bk_set_id: int, bk_modul res = CCApi.create_module( { - "bk_biz_id": env.DBA_APP_BK_BIZ_ID, + "bk_biz_id": bk_biz_id, "bk_set_id": bk_set_id, "data": {"bk_parent_id": bk_set_id, "bk_module_name": bk_module_name}, }, diff --git a/dbm-ui/backend/flow/utils/cc_manage.py b/dbm-ui/backend/flow/utils/cc_manage.py index a6391280ec..b2fd579530 100644 --- a/dbm-ui/backend/flow/utils/cc_manage.py +++ b/dbm-ui/backend/flow/utils/cc_manage.py @@ -336,16 +336,17 @@ def add_service_instance( """ # 检查主机的服务实例,若已存在,则不新建 service_instances = CCApi.list_service_instance_detail( - {"bk_biz_id": self.hosting_biz_id, "bk_host_list": [bk_host_id], "page": {"start": 0, "limit": 200}} + {"bk_biz_id": self.hosting_biz_id, "bk_host_list": [bk_host_id], "page": {"start": 0, "limit": 1000}} )["info"] for ins in service_instances: for process in ins.get("process_instances") or []: + bind_info = process["process"]["bind_info"] or [{"ip": "", "port": ""}] if all( [ process["process"]["bk_func_name"] == func_name, process["process"]["bk_process_name"] == bk_process_name, - process["process"]["bind_info"][0]["ip"] == listen_ip, - process["process"]["bind_info"][0]["port"] == str(listen_port), + bind_info[0]["ip"] == listen_ip, + bind_info[0]["port"] == str(listen_port), ] ): # 如果服务实例已存在,则只更新其标签即可 diff --git a/helm-charts/bk-dbm/Chart.yaml b/helm-charts/bk-dbm/Chart.yaml index 91bd9f770d..19cb281913 100644 --- a/helm-charts/bk-dbm/Chart.yaml +++ b/helm-charts/bk-dbm/Chart.yaml @@ -80,4 +80,4 @@ description: A Helm chart for bk-dbm name: bk-dbm type: application version: 1.3.0-alpha.37 -appVersion: 1.3.0-alpha.37 +appVersion: 1.3.0-alpha.37 \ No newline at end of file diff --git a/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml b/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml index 01c057c77f..c81f130735 100644 --- a/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml +++ b/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 0.0.1-alpha.46 +appVersion: 0.0.1-alpha.47 description: A Helm chart for Kubernetes name: db-simulation type: application diff --git a/helm-charts/bk-dbm/charts/dbm/Chart.yaml b/helm-charts/bk-dbm/charts/dbm/Chart.yaml index c13e3c8ca4..4c86718d31 100644 --- a/helm-charts/bk-dbm/charts/dbm/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbm/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.3.0-alpha.330 +appVersion: 1.3.0-alpha.335 description: A Helm chart for dbm name: dbm type: application