-
Notifications
You must be signed in to change notification settings - Fork 0
<feat>[lb]: add IPVS DR/FullNAT load balancer support #3847
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
base: 5.5.16
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,5 +36,9 @@ public class LoadBalancerGlobalConfig { | |
| @GlobalConfigValidation | ||
| public static GlobalConfig HTTP_MODE = new GlobalConfig(CATEGORY, "httpMode"); | ||
|
|
||
| @GlobalConfigValidation | ||
| public static GlobalConfig IPVS_DEFAULT_MODE = new GlobalConfig(CATEGORY, "ipvs.defaultMode"); | ||
|
|
||
| @GlobalConfigValidation | ||
| public static GlobalConfig IPVS_DEFAULT_SCHEDULER = new GlobalConfig(CATEGORY, "ipvs.defaultScheduler"); | ||
|
Comment on lines
+39
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 请在全局配置层限制 IPVS 默认值的取值范围。 这里的校验还不够强: 🤖 Prompt for AI Agents |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
更新 listener 时的 IPVS 校验还不完整。
这里仅在请求里显式带了
IPVS_MODEtag 时才调用validateIpvsMode(),而且传进去的是msg.getSystemTags()。这会漏掉两类场景:1)一个已经是 IPVS 的 listener 只改balancerAlgorithm,不会再走 IPVS 白名单校验;2)把现有非 IPVS listener 切到 IPVS 时,库里已经存在的maxConnection/connectionIdleTimeout/session*等历史 tag 不会被检查。后面plugin/virtualRouterProvider/src/main/java/org/zstack/network/service/virtualrouter/lb/VirtualRouterLoadBalancerBackend.java的makeLbTOs()仍会把这些旧 tag 放进parameters下发,最终形成非法组合。建议这里先读取当前 listener 的持久化 tags 和当前ipvsMode,合并出一份 effective 配置后再统一做校验。🤖 Prompt for AI Agents