Skip to content

Commit

Permalink
fix(backend): nodeman api 调用问题 #4916
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhw8 committed Jun 13, 2024
1 parent 819c6d0 commit 062a162
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions dbm-ui/backend/db_meta/api/machine/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ def delete(machines: Optional[List], bk_cloud_id: int):
return
bk_biz_id = machines[0].bk_biz_id
bk_host_ids = list(machines.values_list("bk_host_id", flat=True))
machines.delete()

# 获取machines包含的cluster_type
cluster_types = machines.values_list("cluster_type", flat=True).distinct()
cluster_types_list = list(cluster_types)
for cluster_type in cluster_types_list:
CcManage(bk_biz_id, cluster_type).recycle_host(bk_host_ids)
machines.delete()


@transaction.atomic
Expand Down
2 changes: 1 addition & 1 deletion dbm-ui/backend/db_services/ipchooser/query/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def query_agent_status_from_nodeman(cc_hosts, fill_key="status"):
"scope_list": scope_list,
}
try:
status_map = BKNodeManApi.ipchooser_host_details(request_params)
status_map = BKNodeManApi.ipchooser_host_details(request_params, use_admin=True)
for status in status_map:
# agent在线状态,0为不在线,1为在线
cc_hosts[host_map[str(status["host_id"])]][fill_key] = status["alive"]
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/bk-dbm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ dependencies:
description: A Helm chart for bk-dbm
name: bk-dbm
type: application
version: 1.4.0-alpha.55
appVersion: 1.4.0-alpha.55
version: 1.4.0-alpha.56
appVersion: 1.4.0-alpha.56
2 changes: 1 addition & 1 deletion helm-charts/bk-dbm/charts/dbm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 1.4.0-alpha.900
appVersion: 1.4.0-alpha.909
description: A Helm chart for dbm
name: dbm
type: application
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/bk-dbm/charts/dbpriv/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 0.0.1-alpha.323
appVersion: 0.0.1-alpha.326
name: dbpriv
description: A Helm chart for dbpriv
type: application
Expand Down

0 comments on commit 062a162

Please sign in to comment.