You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fact, nerdctl only execute cni.Remove() when run rm/start container instead of stopping container.
At that time, it has run task.Kill, the container progress has exited. So bridge plugin can't obtain the ip address from Netns even we pass the correct sandbox path to it. It'll fail to get ipns then skip to teardown ip masq.
I think this problem may not be easy to solve in nerdctl. However it can be handled in the bridge plugin.
Description
Run or start a container will leak three iptables rules when using cni bridge plugin and set
"ipMasq": true
.Steps to reproduce the issue
1.nerdctl run container
2.nerdctl stop container
3.nerdctl start container
This action will leak six iptables rules in the host.
Describe the results you received and expected
It'll create three iptable rules when run task.Start. But it didn't remove when run task.Delete.
The reason is that cni.Remove() just pass an empty Netns path to the bridge plugin.
Bridge plugin just reclaim ipam pool and skip teardown ip masq when Netns is empty.
Why not pass the correct sandbox path into cni.Remove() ?
What version of nerdctl are you using?
latest
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
The text was updated successfully, but these errors were encountered: