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

Ignore error on enabling TCP early demux for old kernels #1242

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

mogren
Copy link
Contributor

@mogren mogren commented Oct 1, 2020

What type of PR is this?
bug

Which issue does this PR fix:
#1241

What does this PR do / Why do we need it:
For old kernels that do not have the tcp_early_demux kernel flag, the init container throws an error:

[centos@ip-192-168-9-194 ~]$ sysctl -w "net.ipv4.tcp_early_demux=1"
sysctl: cannot stat /proc/sys/net/ipv4/tcp_early_demux: No such file or directory

We need to ignore this warning:

[centos@ip-192-168-9-194 ~]$ sysctl -e -w "net.ipv4.tcp_early_demux=1"

From https://linux.die.net/man/8/sysctl:
-e Use this option to ignore errors about unknown keys.

The "early demux" feature was added in kernel 3.6, but the flag to disable it was not added until 4.6. This means that TCP health checks for pods using per-pod security groups will not work until at least kernel 4.6. UDP or exec checks should still work for pods with ENIs.

If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
Start a CentOS image, run sysctl -w "net.ipv4.tcp_early_demux=1"

Testing done on this change:
See above

Automation added to e2e:
None

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
No

Does this change require updates to the CNI daemonset config files to work?:
No

Does this PR introduce any user-facing change?:
No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@jayanthvn jayanthvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://linux.die.net/man/8/sysctl (-e)option

Looks good :)

@jayanthvn
Copy link
Contributor

I was discussing with Claes, should we instead throw a warning something like - "Current kernel version doesn't support disabling tcp v4 early demux and the issue #1212 will exists".

@mogren mogren force-pushed the ignore-sysctl-error branch from 30378fa to e0be93e Compare October 1, 2020 18:12
@SaranBalaji90 SaranBalaji90 merged commit a6b0d46 into aws:master Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants