Skip to content

Commit

Permalink
sprintfix: 插件进程操作查询不到结果 (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuoZhuoCrayon committed Jun 22, 2022
1 parent c9ce2be commit 2760035
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/backend/components/collections/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,10 +1144,6 @@ def _execute(self, data, parent_data, common_data: PluginCommonData):
gse_op_params = {
"meta": {"namespace": constants.GSE_NAMESPACE, "name": meta_name},
"op_type": op_type,
# GSE 1.0 目标对象
"hosts": [{"ip": host.inner_ip, "bk_cloud_id": host.bk_cloud_id}],
# GSE 2.0 目标对象
"agent_id_list": [host.bk_agent_id],
# 此字段是节点管理自用,仅用于标识,不会被GSE使用
"nodeman_spec": {
"process_status_id": process_status.id,
Expand All @@ -1171,6 +1167,10 @@ def _execute(self, data, parent_data, common_data: PluginCommonData):
},
},
}
if settings.GSE_VERSION == "V1":
gse_op_params["hosts"] = [{"ip": host.inner_ip, "bk_cloud_id": host.bk_cloud_id}]
else:
gse_op_params["agent_id_list"] = [host.bk_agent_id]
self.log_info(subscription_instance.id, json.dumps(gse_op_params, indent=2))
proc_operate_req.append(gse_op_params)

Expand Down

0 comments on commit 2760035

Please sign in to comment.