-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Detect ip6tables failure without full ipv6 support #4019
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
Conversation
Error when running with kernel from Kata Containers: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?) Perhaps ip6tables or your kernel needs to be upgraded. This happens also in Apple Containers. Fallback to ipv4 only. The alternative is building a custom kernel, with full support.
Hi @afbjorklund. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
Thanks for the PR!
You can disable ipv6 in the docker daemon settings? I think that's the best fix, though kind should gracefully handle this, I do worry the error messages will keep shifting but ... 🤷♂️ |
I tried disabling in daemon.json, but it doesn't change. {
"ipv6": false
} There seems to be some open Docker tickets, about this. "I think there's a misunderstanding here due to misleading docs: the daemon's ipv6 flag doesn't disable ipv6 daemon-wide, but it only controls the availability of IPv6 on the default bridge network." So I disabled it system-wide, with
But still got that error, when creating the "kind" network. |
it seems the daemon has an option to disable the ip6tables https://docs.docker.com/engine/daemon/ipv6/#docker-in-docker
|
Interesting, thanks. |
// TODO: this is fragile, and only necessary due to docker enabling ipv6 by default | ||
// even on hosts that lack ip6tables setup. | ||
// Preferably users would either have ip6tables setup properly or else disable ipv6 in docker | ||
const dockerIPV6TablesError = "Error response from daemon: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: ip6tables" |
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.
We should maybe rename and clarify this one versus the new error. That shouldn't block fixing the bug though
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.
/lgtm
/approve
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund, BenTheElder The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
Error when running with kernel from Kata Containers:
This happens also in Apple Containers. Fallback to ipv4 only.
The alternative is building a custom kernel, with full support.
This fixes the
kind create cluster
error that was encountered in:Assuming that user has redirected from nft to legacy, that is.
Got some other error, when trying to create with default iptables.
https://github.com/apple/container/blob/main/docs/tutorial.md
https://github.com/kata-containers/kata-containers/releases/tag/3.17.0
Here is the regular Ubuntu kernel, for reference:
And here is the Kata Containers kernel, no IPv6: