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
[Release 3.11] Bug 1795416: Multiple iptables improvements for kubelet and kube-proxy #24748
[Release 3.11] Bug 1795416: Multiple iptables improvements for kubelet and kube-proxy #24748
Conversation
ac648a0
to
c16faf6
Compare
oh, it's just in a different place in 3.11; |
|
The only thing that I find unexpected is: d4fe81c but I'm guessing this was done to avoid conflicts and seems safe, so looks good. /lgtm |
c16faf6
to
19cf892
Compare
|
@danwinship removed the manual addition of the apimachinery code in favour of the code in |
19cf892
to
61efe75
Compare
|
from the unit test failure: |
61efe75
to
9cd1960
Compare
The upstream patch removes the line
you want to remove the line:
Likewise with
I would drop this one; it should be easy enough to just move the fixes in the later PRs from
and you can just squash this one into "Drop iptables firewalld monitoring support"
I would also drop this. That's a functionality change which is nice and all but we didn't intend to be backporting it and we shouldn't backport it just to make the remaining PRs merge more cleanly.
(please fix to keep the whole title on one line so it shows up right in |
9cd1960
to
193b6c9
Compare
|
/retest |
193b6c9
to
f08f668
Compare
|
@JacobTanenbaum: This pull request references Bugzilla bug 1727441, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1 similar comment
|
@JacobTanenbaum: This pull request references Bugzilla bug 1727441, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@JacobTanenbaum: No Bugzilla bug is referenced in the title of this pull request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@JacobTanenbaum: This pull request references Bugzilla bug 1795416, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/retitle [WIP] [Release 3.11] Multiple iptables improvements for kubelet and kube-proxy test failures seem mostly related to recent CI changes. It's good that e2e-gcp passed. |
|
/lgtm |
|
/test unit |
|
/retest |
…restore binary Origin-commit: 8bced9b The iptables code was doing version detection on the iptables binary but feature detection on the iptables-restore binary, to try to support the version of iptables in RHEL 7, which claims to be 1.4.21 but has certain features from iptables 1.6. The problem is that this particular set of versions and checks resulted in the code passing "-w" ("wait forever for the lock") to iptables, but "-w 5" ("wait at most 5 seconds for the lock") to iptables-restore. On systems with very very many iptables rules, this could result in the kubelet periodic resyncs (which use "iptables") blocking kube-proxy (which uses "iptables-restore") and causing it to time out. We already have code to grab the lock file by hand when using a version of iptables-restore that doesn't support "-w", and it works fine. So just use that instead, and only pass "-w 5" to iptables-restore when iptables reports a version that actually supports it. NOTE: MANUALLY EDITED, upstream switched to from glog -> klog
Origin-commit: a735c97 Kube-proxy's iptables mode used to care whether utiliptables's EnsureRule was able to use "iptables -C" or if it had to implement it hackily using "iptables-save". But that became irrelevant when kube-proxy was reimplemented using "iptables-restore", and no one ever noticed. So remove that check. MANUAL EDITS: vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD removed line //pkg/util/version:go_default_library upstream removes //staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library
Origin-commit: 81cd27a MANUAL EDITS: vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go - parts needed to be manually applied change import k8s.io/apimachinery/pkg/util/version/version.go -> k8s.io/kubernetes/pkg/util/version in vendor/k8s.io/kubernetes/pkg/util/iptables/BUILD manually remove "//pkg/util/version:go_default_library"
…correctly ORIGIN PR: 7588807 NOTES: in vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go needed to change klog -> glog
ORIGIN PR: b6c3d54 The firewalld monitoring code was not well tested (and not easily testable), would never be triggered on most platforms, and was only being taken advantage of from one place (kube-proxy), which didn't need it anyway since it already has its own resync loop. Since the firewalld monitoring was the only consumer of pkg/util/dbus, we can also now delete that. NOTES: cannot actually delete the dbus code pkg/dns relies on it manually removed dbus code from: vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD vendor/k8s.io/kubernetes/pkg/kubelet/BUILD vendor/k8s.io/kubernetes/pkg/util/BUILD manually applied from: vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go does not compile, needs future commits
ORIGIN PR: 3948f16 Kubelet and kube-proxy both had loops to ensure that their iptables rules didn't get deleted, by repeatedly recreating them. But on systems with lots of iptables rules (ie, thousands of services), this can be very slow (and thus might end up holding the iptables lock for several seconds, blocking other operations, etc). The specific threat that they need to worry about is firewall-management commands that flush *all* dynamic iptables rules. So add a new iptables.Monitor() function that handles this by creating iptables-flush canaries and only triggering a full rule reload after noticing that someone has deleted those chains. NOTES: klog->glog in vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go manual application of patches in vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go vendor/k8s.io/kubernetes/pkg/util/iptables/BUILD vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go the changes to vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go had to be manually applied to vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go does not compile needs a future commit
…ter iptables flush
Notes
manually changed refereances to the imports
e2eservice "k8s.io/kubernetes/test/e2e/framework/service"
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
to framework because that is there the functions reside
had to do a bring in clientset because StopServeHostname() and StartServeHostName
take a internalClientset.interface instead of Service
manually performed the operations of ssh.LogResult()
correct the arguments to StartServeHostnameService and StopServeHostnameService
SDN COMMIT: 3b71b6bba38c1eeb0b92155ee97d20e9e9b9b199
NOTE:
because of the split the whole patch had to be manually applied
pkg/network/node/iptables.go and pkg/network/node/pod.go had the functionality in pkg/network/node/iptables.go
pkg/cmd/server/kubernetes/network/network.go has the functionality of pkg/openshift-sdn/proxy.go
…ock" errors ORIGIN PR: 2f89c03 NOTES: had to manually apply the patch because of klog -> glog
backport of sdn commit 326354dc2f29bafd41394ea8807d75d23288e20e very heavliy modified in order to function The iptables proxier has been fixed to not constantly resync its rules when not needed... except that the hybrid proxier was forcing it to do it anyway. Fix that by moving the NodeIPTables monitor up out to the top level of openshift-sdn-node and sharing it between the node and proxy code.
Tweak the upstream commits to preserve the old behavior for kube-proxy health and metrics. In 4.4 we will get the upstream fix for health, and will need to ensure that our monitoring is fixed to use different metrics. MANUAL EDIT: the metric metrics.SyncProxyRulesLastTimestamp does not exist in the version of kube in 3.11 so I need to remove it change SyncProxyRules to forceSyncProxyRules() in proxier_test.go
98abed3
to
0c9e44a
Compare
|
@JacobTanenbaum: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/assign @knobunc eparis |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, JacobTanenbaum, juanluisvaladas, knobunc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@JacobTanenbaum: All pull requests linked via external trackers have merged: Bugzilla bug 1795416 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
A series of backported commits that improves kubelet and kube-proxy performance
https://bugzilla.redhat.com/show_bug.cgi?id=1795416