-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Enable nf_conntrack_tcp_be_liberal
for Ubuntu 22.04 until kernel update
#7860
Enable nf_conntrack_tcp_be_liberal
for Ubuntu 22.04 until kernel update
#7860
Conversation
@ritchxu we should really move it somewhere else and modify sysctl.conf. Your changes only modify /proc, and all the changes will be lost after a machine reboot happens (which we do a lot during deployment too) |
Thanks @mikhailkoliada do you have an effective way of persisting
|
Hey @ritchxu. There is a couple of sysctl adjustments for linux runner image here: https://github.com/actions/runner-images/blob/main/images/linux/scripts/installers/configure-environment.sh#L31-L37. You may try adding new flag the same way. |
I did notice that, but suspect the change wouldn't stick given my test in #7860 (comment), but let's give it a try 😄 |
images/linux/ubuntu2204.pkr.hcl
Outdated
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" | ||
inline = ["cat /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal", "sysctl -a | grep nf_conntrack_tcp_be_liberal"] | ||
} | ||
|
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.
Only temporary to verify if the net.netfilter.nf_conntrack_tcp_be_liberal
change sticks after reboot.
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.
The change didn't stick 😞 https://github.com/actions/runner-images/actions/runs/5556097720/jobs/10148164916?pr=7860#step:7:17962
==> azure-arm.build_vhd: Provisioning with shell script: /home/vsts/Agents/image-generation/_work/runner-images/runner-images/images/linux/scripts/base/reboot.sh
azure-arm.build_vhd: Reboot VM
==> azure-arm.build_vhd: Provisioning with shell script: /tmp/packer-shell1639431296
azure-arm.build_vhd: 0
azure-arm.build_vhd: net.netfilter.nf_conntrack_tcp_be_liberal = 0
Well, I found solution finally. Occasionally, we can't set this value in Also I didn't found appropriate nf_conntrack module option for that so we can't set it using But I able to set it using udev rules. I created a file
I'm not sure it's a good solution, but it works at least. |
@vpolikarpov-akvelon Thanks for the suggestion 👍🏼. I've pushed a commit to try it out. |
Hey @ritchxu. Could you please merge or rebase you branch onto main? |
3791530
to
f40e07e
Compare
Done 👍🏼 |
Hey, @ritchxu. I'm really sorry, but there is a couple more of important patches that should be merged for tests to complete successfully. Could you please rebase once more? |
f40e07e
to
7c8d990
Compare
No problem, it's done 👍🏼 |
@vpolikarpov-akvelon your workaround works! https://github.com/actions/runner-images/actions/runs/5624140452/job/15240333265?pr=7860#step:7:18196
I pushed another update to remove the temporary step that prints out ☝🏼. We should be good to go! |
Description
Azure's latest Ubuntu 22.04 image is lacking a kernel fix torvalds/linux@6e250dc.
GitHub Actions'
ubuntu-22.04
image is built upon Azure's base image. Without the fix, when customers' workflows upload large-size artifacts to remote servers and remote server fell behind in responding with ACK TCP packets, the delayed ACK packets are counted as INVALID because they are out of the TCP window, leading to the client kernel panic and responding with RST. This results in the intermittent connection reset symptom that has been reported by multiple customers1234.Solution
Until the base image is updated to include the kernel fix, this PR proposes to enable the
nf_conntrack_tcp_be_liberal
kernel flag5. As a result, only out-of-window RST segments will be marked as INVALID while out-of-window ACK packets will be allowed.Check list
Footnotes
https://github.com/github/c2c-actions-support/issues/2441 ↩
https://github.com/github/c2c-actions-support/issues/2461 ↩
https://github.com/github/c2c-package-registry/issues/6891 ↩
https://github.com/github/c2c-package-registry/issues/7013 ↩
https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt ↩