Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimization: 消除运行环境差异 (closed #779) #812

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions apps/mock_data/common_unit/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@
"is_default": True,
"creator": ["admin"],
"port_config": constants.GSE_PORT_DEFAULT_VALUE,
"proxy_package": [
"gse_client-windows-x86.tgz",
"gse_client-windows-x86_64.tgz",
"gse_client-linux-x86.tgz",
"gse_client-linux-x86_64.tgz",
"gse_client-aix-powerpc.tgz",
],
"proxy_package": constants.GSE_CLIENT_PACKAGES,
"outer_callback_url": f"http://{DEFAULT_IP}:10300/backend",
}

Expand Down
16 changes: 9 additions & 7 deletions apps/node_man/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,16 +816,18 @@ class PolicyRollBackType:
ROLLBACK_TYPE__ALIAS_MAP = {SUPPRESSED: "已被其他策略管控", LOSE_CONTROL: "脱离策略管控", TRANSFER_TO_ANOTHER: "转移到优先级最高的策略"}


GSE_CLIENT_PACKAGES: List[str] = [
"gse_client-windows-x86.tgz",
"gse_client-windows-x86_64.tgz",
"gse_client-aix-powerpc.tgz",
"gse_client-linux-x86.tgz",
"gse_client-linux-x86_64.tgz",
]

FILES_TO_PUSH_TO_PROXY = [
{"files": ["py36.tgz"], "name": _("检测 BT 分发策略(下发Py36包)")},
{
"files": [
"gse_client-windows-x86.tgz",
"gse_client-windows-x86_64.tgz",
"gse_client-aix-powerpc.tgz",
"gse_client-linux-x86.tgz",
"gse_client-linux-x86_64.tgz",
],
"files": GSE_CLIENT_PACKAGES,
"name": _("下发安装包"),
"from_type": ProxyFileFromType.AP_CONFIG.value,
},
Expand Down
2 changes: 0 additions & 2 deletions apps/node_man/migrations/0023_init_proxy_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ def init_proxy_package(apps, schema_editor):


class Migration(migrations.Migration):

dependencies = [
("node_man", "0022_accesspoint_proxy_package"),
]

operations = [
migrations.RunPython(init_proxy_package),
]
3 changes: 2 additions & 1 deletion config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from django.utils.translation import ugettext_lazy as _

import env
from apps.node_man import constants
from apps.utils.enum import EnhanceEnum
from apps.utils.env import get_type_env

Expand Down Expand Up @@ -598,7 +599,7 @@ def get_standard_redis_mode(cls, config_redis_mode: str, default: Optional[str]
REDBEAT_REDIS_URL = "redis-sentinel://redis-sentinel:{port}/0".format(port=REDIS_PORT or 26379)

# 临时兼容社区版单例配置
if BKAPP_RUN_ENV == "ce":
if BKAPP_RUN_ENV == constants.BkappRunEnvType.CE:
REDBEAT_REDIS_URL = "redis://:{passwd}@{host}:{port}/0".format(
passwd=REDIS_PASSWORD, host=REDIS_HOST, port=REDIS_PORT or 6379
)
Expand Down
2 changes: 1 addition & 1 deletion dev_log/2.1.348/crayon_202109242000.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bugfix:
- "社区版GSE部分端口网络不通 (fixed #146)"
- "GSE部分端口网络不通 (fixed #146)"
3 changes: 3 additions & 0 deletions dev_log/2.2.16/xcwang_202206071506.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
optimization:
- "消除运行环境差异 (closed #779)"
2 changes: 1 addition & 1 deletion docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
- subscription/fetch_commands 接口报错 (fixed #159)
- 修复周期任务执行报错:ZeroDivisionError('division by zero',) (fixed #153)
- 清除cookies后重新登录异常问题 (close #156)
- 社区版GSE部分端口网络不通 (fixed #146)
- GSE部分端口网络不通 (fixed #146)
- Agent转安装Proxy报错问题(fixed #161)
- 修复插件列表前端403报错 (fixed #158)
- 节点列表无法过滤手动停止主机 (fixed #151)
Expand Down
2 changes: 1 addition & 1 deletion release/V2.1.348_20210928.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- subscription/fetch_commands 接口报错 (fixed #159)
- 修复周期任务执行报错:ZeroDivisionError('division by zero',) (fixed #153)
- 清除cookies后重新登录异常问题 (close #156)
- 社区版GSE部分端口网络不通 (fixed #146)
- GSE部分端口网络不通 (fixed #146)
- Agent转安装Proxy报错问题(fixed #161)
- 修复插件列表前端403报错 (fixed #158)
- 节点列表无法过滤手动停止主机 (fixed #151)
Expand Down