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

Fail container when ip6tables fails #388

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented May 30, 2024

Fail container when ip6tables fails

Ignoring these failures can cause IPv6 traffic to bypass the proxy; i.e.
IPv6 traffic can work in a cluster but linkerd might not be configured
with the appropriate iptables flavor (nft or legacy) and so the rules
won't be set.

Back when we had IPv6 support enabled by default we still ran these
ip6tables rules in IPv4-only clusters and so ignored failures to avoid
breaking things unexpectedly. But now that IPv6 support is opt-in, we
should expect the cluster to provide a fully functional IPv6 stack and
linkerd is configured appropriately for it, and so fail early when
things don't work as expected.

This change also explicitly disables IPv6 in the integration tests.

@alpeb alpeb requested a review from a team as a code owner May 30, 2024 14:05
@alpeb alpeb force-pushed the alpeb/fail-on-ip6table-failures branch from 461032e to fea05c3 Compare May 30, 2024 15:11
@alpeb alpeb marked this pull request as draft May 30, 2024 15:11
@alpeb alpeb force-pushed the alpeb/fail-on-ip6table-failures branch 10 times, most recently from 4257448 to 93ec333 Compare May 31, 2024 17:55
Ignoring these failures can cause IPv6 traffic to bypass the proxy; i.e.
IPv6 traffic can work in a cluster but linkerd might not be configured
with the appropriate iptables flavor (nft or legacy) and so the rules
won't be set.

Back when we had IPv6 support enabled by default we still ran these
ip6tables rules in IPv4-only clusters and so ignored failures to avoid
breaking things unexpectedly. But now that IPv6 support is opt-in, we
should expect the cluster to provide a fully functional IPv6 stack and
linkerd is configured appropriately for it, and so fail early when
things don't work as expected.

This change also explicitly disables IPv6 in the integration tests.

Note that tests won't pass until linkerd/linkerd2#12663 gets included
into an edge.
@alpeb alpeb force-pushed the alpeb/fail-on-ip6table-failures branch from 93ec333 to 7c0f3a2 Compare May 31, 2024 18:24
@alpeb alpeb marked this pull request as ready for review May 31, 2024 18:42
@alpeb alpeb merged commit fb799cd into main Jun 7, 2024
17 checks passed
@alpeb alpeb deleted the alpeb/fail-on-ip6table-failures branch June 7, 2024 18:27
alpeb added a commit to linkerd/linkerd2 that referenced this pull request Jun 12, 2024
Those releases ensure that when IPv6 is enabled, the series of ip6tables commands succeed. If they fail, the proxy-init/linkerd-cni containers should fail as well, instead of ignoring errors.

See linkerd/linkerd2-proxy-init#388
alpeb added a commit to linkerd/linkerd2 that referenced this pull request Jun 13, 2024
Those releases ensure that when IPv6 is enabled, the series of ip6tables commands succeed. If they fail, the proxy-init/linkerd-cni containers should fail as well, instead of ignoring errors.

See linkerd/linkerd2-proxy-init#388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants