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

delete lsp and ipam with ip #3540

Merged
merged 10 commits into from
Dec 21, 2023
Merged

Conversation

bobz965
Copy link
Collaborator

@bobz965 bobz965 commented Dec 18, 2023

Pull Request

What type of this PR

Examples of user facing changes:

  • Features: 在清理 IP 的过程中, lsp 和 ipam 直接随 ip 删除而释放。
  1. 用户确定不再使用当前的子网,
    1.1 基于 multus 多网卡 NAD 维护,用户换了一个子网,由于 multus network-attachment-definition 的设计在使用多网卡时十分灵活。如果 IP 删除而 lsp 保留则会导致无法新建同名的 lsp。这种 ip 会直接走 changeVMSubnet 逻辑直接删除重建。
    1.2 基于 multus 多网卡 NAD 维护,用户移除了一个子网,这种 ip 要在pod annos变更之后, 手动删除该 IP

用户关机 --> 删除 ipcr --> 开机: 这个场景会创建新的 IP

  1. 将部署 pod 关联的 sg 以及 ipam 的资源清理移到 IP 的 清理逻辑中,应该可以加快 pod 资源的释放。

参考:
在 openstack neutron 的设计中:
neutron 设计了一个 port 的数据库表,用于直接维护 ip 以及 安全组,地址对 ip 等信息。
目前 kube-ovn 的 IP 的业务逻辑十分简单。 可以考虑将一些 IP 相关的资源的逻辑 IP中去。

Which issue(s) this PR fixes

Fixes #(issue-number)

WHAT

copilot:summary

copilot:poem

HOW

copilot:walkthrough

@bobz965 bobz965 force-pushed the ip-delete-ipam-and-lsp branch 4 times, most recently from ca66100 to 6c2909d Compare December 19, 2023 09:08
@bobz965 bobz965 marked this pull request as ready for review December 19, 2023 09:26
@bobz965 bobz965 force-pushed the ip-delete-ipam-and-lsp branch 3 times, most recently from e352ca1 to 6edf107 Compare December 20, 2023 11:56
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
pkg/controller/gc.go Outdated Show resolved Hide resolved
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
@bobz965 bobz965 merged commit 51dcf7f into kubeovn:master Dec 21, 2023
54 of 59 checks passed
@bobz965 bobz965 deleted the ip-delete-ipam-and-lsp branch December 21, 2023 06:45
bobz965 added a commit that referenced this pull request Dec 21, 2023
* delete lsp and ipam with ip

* refresh sg after delete ip lsp

---------

Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
bobz965 added a commit that referenced this pull request Dec 22, 2023
* delete lsp and ipam with ip

* refresh sg after delete ip lsp

---------

Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
bobz965 added a commit that referenced this pull request Mar 22, 2024
* delete lsp and ipam with ip

* refresh sg after delete ip lsp

---------

Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
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.

None yet

3 participants