Skip to content

Commit 81b000c

Browse files
authored
Merge pull request #4019 from afbjorklund/docker-apple
Detect ip6tables failure without full ipv6 support
2 parents 8ea0f27 + 9479b9c commit 81b000c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/cluster/internal/providers/docker/network.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,10 @@ func isIPv6UnavailableError(err error) bool {
271271
// even on hosts that lack ip6tables setup.
272272
// Preferably users would either have ip6tables setup properly or else disable ipv6 in docker
273273
const dockerIPV6TablesError = "Error response from daemon: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: ip6tables"
274-
return strings.HasPrefix(errorMessage, dockerIPV6DisabledError) || strings.HasPrefix(errorMessage, dockerIPV6TablesError)
274+
// we get this error when ipv6 is missing in kernel
275+
const dockerIPV6PolicyError = "Error response from daemon: setting default policy to DROP in FORWARD chain failed: (iptables failed: ip6tables"
276+
277+
return strings.HasPrefix(errorMessage, dockerIPV6DisabledError) || strings.HasPrefix(errorMessage, dockerIPV6TablesError) || strings.HasPrefix(errorMessage, dockerIPV6PolicyError)
275278
}
276279

277280
func isPoolOverlapError(err error) bool {

0 commit comments

Comments
 (0)