-
Notifications
You must be signed in to change notification settings - Fork 642
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: add network cleanup for kill and stop cmd #2839
fix: add network cleanup for kill and stop cmd #2839
Conversation
Signed-off-by: Alessio Greggi <[email protected]>
Can we have an integration test? (See |
Sure! |
@AkihiroSuda just added |
Thanks, looks good, but please squash commits |
58cfbef
to
7cbdedd
Compare
Sure and thanks for the accurate review. I learned something new :) |
CI is failing, probably you need to wrap the clean up function with |
f59d981
to
f86baac
Compare
Fixed! |
Because the iptables names are different for Docker.
|
What if I edit the func ForwardExists(t *testing.T, ipt *iptables.IPTables, chain, containerIP string, port int) bool Then we could add a condition in the tests to check if target is docker or not and pass the chain name accordingly.
WDYT? |
@AkihiroSuda I just pushed the code with the changes I described above. |
Thanks, looks good, please squash |
Signed-off-by: Alessio Greggi <[email protected]>
840aed2
to
41b669d
Compare
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.
Thanks
Fix #2699
This PR provides code to cleanup CNI network setup when
kill
andstop
command are typed.Additionally, the
onStartContainer
hook was added in order to restore the CNI network setup whenstart
command is typed (as suggested in the issue by @yankay).How to test
In order to test this PR, follow these commands:
Credits
Thanks to @yankay and @89luca89 for the help