mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-11-30 23:16:04 +07:00
Detect ip6tables failure without full ipv6 support
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.
This commit is contained in:
@@ -271,7 +271,10 @@ func isIPv6UnavailableError(err error) bool {
|
|||||||
// even on hosts that lack ip6tables setup.
|
// even on hosts that lack ip6tables setup.
|
||||||
// Preferably users would either have ip6tables setup properly or else disable ipv6 in docker
|
// 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"
|
const dockerIPV6TablesError = "Error response from daemon: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: ip6tables"
|
||||||
return strings.HasPrefix(errorMessage, dockerIPV6DisabledError) || strings.HasPrefix(errorMessage, dockerIPV6TablesError)
|
// we get this error when ipv6 is missing in kernel
|
||||||
|
const dockerIPV6PolicyError = "Error response from daemon: setting default policy to DROP in FORWARD chain failed: (iptables failed: ip6tables"
|
||||||
|
|
||||||
|
return strings.HasPrefix(errorMessage, dockerIPV6DisabledError) || strings.HasPrefix(errorMessage, dockerIPV6TablesError) || strings.HasPrefix(errorMessage, dockerIPV6PolicyError)
|
||||||
}
|
}
|
||||||
|
|
||||||
func isPoolOverlapError(err error) bool {
|
func isPoolOverlapError(err error) bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user