-
Notifications
You must be signed in to change notification settings - Fork 446
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
fix: lsp define in nb is not clear when delete vm #3429
fix: lsp define in nb is not clear when delete vm #3429
Conversation
3ccdd7e
to
309810b
Compare
pkg/controller/pod.go
Outdated
ports, err := c.OVNNbClient.ListNormalLogicalSwitchPorts(true, map[string]string{"pod": key}) | ||
isVMPod, vmName := isVMPod(pod) | ||
podkey := key | ||
if isVMPod { |
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.
在设置 keep-vm-ip 参数的情况下,可以使用 vm name 作为 key 查找 lsp
如果没有设置该参数,vm pod 的 lsp name 仍然为 pod name 构成。
因此需要添加 c.config.EnableKeepVMIP 参数判断
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.
ok
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.
pod ipam release 也需要修改下名字
b007604
to
b94aa09
Compare
b94aa09
to
653e587
Compare
Signed-off-by: wujixin <[email protected]>
653e587
to
1e45f27
Compare
ports, err := c.OVNNbClient.ListNormalLogicalSwitchPorts(true, map[string]string{"pod": key}) | ||
isVMPod, vmName := isVMPod(pod) | ||
isVMPodNeedKeepIP := isVMPod && c.config.EnableKeepVMIP | ||
podkey := key |
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.
后面的 c.ipam.ReleaseAddressByPod(key) 应该也有问题
pr #3476 has fixed this. |
What type of this PR
fix: lsp define in nb is not clear when delete vm
Which issue(s) this PR fixes
#3424
WHAT
If lsp define in nb is not clear, only gc run can clear it.
HOW
we can think the pod is vm or normal pod when add some logic.