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

try fix fip not work for default vpc #3666

Closed
wants to merge 4 commits into from

Conversation

a180285
Copy link

@a180285 a180285 commented Jan 23, 2024

Pull Request

What type of this PR

Examples of user facing changes:

  • Bug fixes

Which issue(s) this PR fixes

Fixes #3502

WHAT

copilot:summary

copilot:poem

HOW

copilot:walkthrough

@a180285
Copy link
Author

a180285 commented Jan 24, 2024

从 issue 讨论的日志来看,使用 annotation 也是加的路由

I0124 21:46:30.071326       1 vpc.go:689] vpc ovn-cluster add static route: &{Policy:policySrc CIDR:10.5.192.68 NextHopIP:10.5.0.1 ECMPMode: BfdID: RouteTable:}

只是被 policy based route 覆盖了?

a180285 and others added 3 commits January 24, 2024 23:07
Co-authored-by: 张祖建 <[email protected]>
Signed-off-by: HuangWei <[email protected]>
use c.config.ClusterRouter instead of defaultVPC const

Signed-off-by: HuangWei <[email protected]>
@@ -421,6 +421,28 @@ func (c *Controller) handleUpdateOvnFip(key string) error {
return err
}
// ovn add fip
if vpcName == c.config.ClusterRouter {
// fix issue https://github.com/kubeovn/kube-ovn/issues/3502
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个注释删掉吧

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

klog.Errorf("failed to create config map %s, %v", util.ExternalGatewayConfig, err)
return err
}
externalGwAddr := cm.Data["external-gw-addr"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里直接拿 eip 的 subnet 的 gw, 不然当多公网时,这个数据就不对了。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

pkg/controller/ovn_fip.go Outdated Show resolved Hide resolved
@@ -457,6 +479,12 @@ func (c *Controller) handleDelOvnFip(key string) error {
}
// ovn delete fip nat
if cachedFip.Status.Vpc != "" && cachedFip.Status.V4Eip != "" && cachedFip.Status.V4Ip != "" {
if cachedFip.Status.Vpc == c.config.ClusterRouter {
match := fmt.Sprintf("ip4.src == %s", cachedFip.Status.V4Ip)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

通过port group和address set同意管理需要出external network的pod的策略路由,不然每多一个fip pod就会多一条规则

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉合理,后面改改

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经改为 port group 管理了

@zbb88888
Copy link
Collaborator

@a180285 你看下这个issue: #2090 ,我感觉历史实现中是直接能用的

@oilbeater
Copy link
Collaborator

@a180285 please fix the go-lint issues

@zbb88888
Copy link
Collaborator

@a180285 please fix the go-lint issues

@a180285 如果自己配路由可以用的话,这个 PR 麻烦关一下吧,目前实现会影响基于 node join 网段的网络功能。

@a180285
Copy link
Author

a180285 commented Jan 31, 2024

@oilbeater 我看 #2090 最后给了手动解决的办法。这个 PR 还需要合并吗?

@a180285
Copy link
Author

a180285 commented Jan 31, 2024

我先关掉吧,后面需要再打开

@a180285 a180285 closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.12.3 默认VPC内使用OVN EIP,但是ping的回包还是原ip
5 participants