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

Update iptables-wrapper-installer.sh from upstream #1611

Merged

Conversation

endzyme
Copy link
Contributor

@endzyme endzyme commented Jul 14, 2022

Description

We are experiencing problems with the current version of the iptables-wrapper script. If you have any processes which are using an older binary for iptables, you can experience issues with Flannel selecting the correct version of iptables when first starting the container. Currently if your iptables-legacy-save output is greater than or equal to the output of iptables-nft-save then the container will select using the legacy table. The new behavior, which is supported in Kubernetes 1.17+ will look for some special table names in iptables, provided by kubelet, and if they are not found then will revert to line counting. This yields a more consistent experience with iptables version selection.

Change: Download the v2 version of this script which behaves more consistently but reverts back to the old behavior of iptables-save line counting if the other behaviors don't work.

Script source: https://raw.githubusercontent.com/kubernetes-sigs/iptables-wrappers/v2/iptables-wrapper-installer.sh
SHA: e139a115350974aac8a82ec4b815d2845f86997e
Pulled from: https://github.com/kubernetes-sigs/iptables-wrappers

Todos

  • Tests
  • Documentation
  • Release note

Release Note

Upgrade mechanism to select iptables legacy vs nf_tables to more modern upstream script

@endzyme
Copy link
Contributor Author

endzyme commented Jul 14, 2022

Note that I've only tested this on v0.14.0.

@thomasferrandiz
Copy link
Contributor

Thanks for the PR.
Could you please squash the commits before we merge it?

@endzyme endzyme force-pushed the update-iptables-wrapper-upstream branch from 92c2621 to 65ab1dd Compare August 16, 2022 14:11
@endzyme
Copy link
Contributor Author

endzyme commented Aug 16, 2022

All set - and rebased onto mainline.

@endzyme
Copy link
Contributor Author

endzyme commented Sep 7, 2022

Anything I need to do here? The linter appears to be failing on files I didn't touch.

@thomasferrandiz
Copy link
Contributor

Hi
yes it's an error unrelated to your code. It was fixed in the master branch.
Could you rebase again please?
This should fix the issue.

Downloaded the v2 version of this script which behaves more consistently
but reverts back to the old behavior of iptables-save line counting if
the other behaviors don't work.

Script source: https://raw.githubusercontent.com/kubernetes-sigs/iptables-wrappers/v2/iptables-wrapper-installer.sh
SHA: e139a115350974aac8a82ec4b815d2845f86997e
Pulled from: https://github.com/kubernetes-sigs/iptables-wrappers
@endzyme endzyme force-pushed the update-iptables-wrapper-upstream branch from 65ab1dd to ef3ae5f Compare September 15, 2022 17:04
@endzyme
Copy link
Contributor Author

endzyme commented Sep 15, 2022

@thomasferrandiz all set

@endzyme
Copy link
Contributor Author

endzyme commented Oct 17, 2022

Bump

@thomasferrandiz
Copy link
Contributor

Sorry I missed your previous update.

@thomasferrandiz thomasferrandiz merged commit 74a34bf into flannel-io:master Oct 18, 2022
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

2 participants