linux: Backport fixes for bpfilter and usermode helper to prevent iptable failures with "no child processes"#1495
Open
randomvariable wants to merge 2 commits intovmware:3.0from
Conversation
added 2 commits
July 20, 2023 01:14
Signed-off-by: Naadir Jeewa <jeewan@vmware.com> Change-Id: I488dbd212de7fb36d6ee342054f6c66e086f2dc0
affecting iptables. Signed-off-by: Naadir Jeewa <jeewan@vmware.com> Change-Id: Iac186b69ee40873c30e102400d21ac2241ae4120
031e399 to
e48406e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Under some circumstances which are not fully understood, the user mode helper process of the bpfilter module may fail. This causes applications that use iptables (notably Kubernetes kube-proxy and CNIs such as Calico) to not be able to view or change iptables. The error message received under such circumstances is:
Ways to reproduce:
Failure mode 1:
rmmod bpfilteriptablesFailure mode 2:
bpfilter_umh, e.g./proc/<pid>/fd/0iptables(this will break until the next reboot)In some failure modes, this can be worked around with
rmmod bpfilter.The patches here make getsockopt, which is the syscall that iptables expects to succeed return successfully even if the usermode helper process is not working. Additionally, there are pre-requisite backports to improve the robustness of the bpfilter module.
When used together, neither of the failure modes are present.
Signed-off-by: Naadir Jeewa jeewan@vmware.com