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

双栈proxy云区域同时支持ipv4和ipv6单栈pagent的纳管 #2032

Closed
ryan-canway opened this issue Dec 26, 2023 · 3 comments
Closed

双栈proxy云区域同时支持ipv4和ipv6单栈pagent的纳管 #2032

ryan-canway opened this issue Dec 26, 2023 · 3 comments
Assignees
Labels
for test 可以在测试环境进行验收 kind/feature 功能 todo 进入开发排期的状态,纳入了最近的迭代

Comments

@ryan-canway
Copy link
Collaborator

背景

同一个云区域下既有ipv4主机也有ipv6主机,需要在同一个云区域下进行2个协议的主机类型进行纳管

功能

proxy支持ipv4和ipv6云区域同时支持ipv4和ipv6单栈pagent的纳管

@ryan-canway ryan-canway added backlog 需求初始状态,等待产品进行评估 kind/feature 功能 labels Dec 26, 2023
@chalice-1831
Copy link
Collaborator

背景

当前版本安装pagent,proxy机器为双栈机器,在生成连接配置时即使proxy有v6地址也仍然只会使用ipv4的地址

导致单栈ipv6的pagent无法正常安装

方案

针对安装pagent时提供的ip协议栈进行选择

当仅填写ipv4地址时走proxy的ipv4地址

当仅填写ipv6地址时走proxy的ipv6地址

同时填写ipv4 与 ipv6地址时走proxy ipv4地址

需要保证当pagent使用ipv6地址进行纳管时 proxy必须要有ipv6的地址记录在db中
image

涉及后端函数修改apps/backend/agent/tools.py fetch_gse_servers_info
image

@ZhuoZhuoCrayon
Copy link
Member

没毛病,相当于要提供一个方法,根据 P-Agent IP 的协议(v4/v6),对 Proxy 的接入 IP 按协议进行选择,而不是当前代码里的 v4 or v6 逻辑(v4 优先);
判断 v6 / v4 可以用 /apps/utils/basic.py 里的 is_v6 / is_v4

@chalice-1831
Copy link
Collaborator

自测

单栈v6安装
微信截图_20240418111446
微信截图_20240418111519
proxy:
微信截图_20240418111314
pagent:
微信截图_20240418111345

双栈安装pagent仍然走之前的v4优先逻辑:
微信截图_20240418112230

@chalice-1831 chalice-1831 added todo 进入开发排期的状态,纳入了最近的迭代 for test 可以在测试环境进行验收 and removed backlog 需求初始状态,等待产品进行评估 labels Apr 18, 2024
@wyyalt wyyalt closed this as completed in 4d251d8 Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for test 可以在测试环境进行验收 kind/feature 功能 todo 进入开发排期的状态,纳入了最近的迭代
Projects
None yet
Development

No branches or pull requests

5 participants