Skip to content

Commit

Permalink
bugfix: 手动安装p-agent,windows服务器失败(close #233)
Browse files Browse the repository at this point in the history
  • Loading branch information
CohleRustW authored and ZhuoZhuoCrayon committed Nov 3, 2021
1 parent 426d987 commit def9935
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/backend/agent/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def choose_script_file(host: models.Host) -> str:
# proxy 安装
return "setup_proxy.sh"

if host.install_channel_id or (host.node_type == constants.NodeType.PAGENT and not host.is_manual):
if host.install_channel_id or host.node_type == constants.NodeType.PAGENT:
# 远程安装 P-AGENT 或者指定安装通道时,用 setup_pagent 脚本
return constants.SetupScriptFileName.SETUP_PAGENT_PY.value

Expand Down Expand Up @@ -187,6 +187,8 @@ def gen_commands(host: models.Host, pipeline_id: str, is_uninstall: bool) -> Ins

dest_dir = jump_server.agent_config["temp_path"]
dest_dir = suffix_slash("linux", dest_dir)
if host.is_manual:
run_cmd_params.insert(0, f"{dest_dir}{script_file_name} ")
host_tmp_path = suffix_slash(host.os_type.lower(), host.agent_config["temp_path"])
host_identity = (
host.identity.key if host.identity.auth_type == constants.AuthType.KEY else host.identity.password
Expand Down
3 changes: 3 additions & 0 deletions dev_log/2.1.354/xcwang_202111031646.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfix:
- "手动安装p-agent,windows服务器失败(close #233)"

0 comments on commit def9935

Please sign in to comment.