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

bridge plugin:call ipam.ExecDel after clean device in netns #666

Closed
gojoy opened this issue Sep 26, 2021 · 2 comments · Fixed by #702
Closed

bridge plugin:call ipam.ExecDel after clean device in netns #666

gojoy opened this issue Sep 26, 2021 · 2 comments · Fixed by #702

Comments

@gojoy
Copy link
Contributor

gojoy commented Sep 26, 2021

https:/containernetworking/plugins/blob/master/plugins/main/bridge/bridge.go#L635
now bridge plugin call ipam.ExecDel firstly and then clean device in netns when DEL, if execute ipam.ExecDel successful but clean device failed, in this situation the ip has been released in ipam server, while the ip was still used in this netns, may cause ip conflict if ipam allocate the ip to another new pod.

should call ipam.ExecDel after clean device in netns ?
thanks

@gojoy gojoy changed the title bridge bridge plugin:call ipam.ExecDel after clean device in netns Sep 26, 2021
@mars1024
Copy link
Member

I think your concern is indeed right, but two conditions below make sure ip conflict happened rarely,

  1. host-local use serial strategy for IP allocation, this means a released IP will not be reused unless IP range is running out
  2. removing device is hard to fail, nearly impossible

@gojoy
Copy link
Contributor Author

gojoy commented Sep 30, 2021

I think your concern is indeed right, but two conditions below make sure ip conflict happened rarely,

  1. host-local use serial strategy for IP allocation, this means a released IP will not be reused unless IP range is running out
  2. removing device is hard to fail, nearly impossible

yes,ip conflict happened rarely, but it happened and cause some problem in my situation,the basic reason why cni clean device failed is still under investigation. while we can avoid this by optimize the clean process in cni plugin, I have finished it and it works fine in my test environment .
Can I submit a PR for this?
Thanks

gojoy added a commit to gojoy/plugins that referenced this issue Feb 14, 2022
gojoy added a commit to gojoy/plugins that referenced this issue Feb 27, 2022
@dcbw dcbw closed this as completed in #702 Mar 2, 2022
squeed pushed a commit to squeed/plugins that referenced this issue Mar 9, 2022
tjjh89017 pushed a commit to tjjh89017/plugins that referenced this issue Aug 18, 2022
mccv1r0 pushed a commit to mccv1r0/plugins that referenced this issue Jan 4, 2023
mccv1r0 pushed a commit to mccv1r0/plugins that referenced this issue Jan 10, 2023
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 a pull request may close this issue.

2 participants