Sets HostNetwork to False for tests which do not require it#78731
Sets HostNetwork to False for tests which do not require it#78731k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Conversation
test/e2e/framework/util.go
Outdated
There was a problem hiding this comment.
I was reading the comments from previous thread (#69525 (comment)). Isn't that still true?
There was a problem hiding this comment.
@BCLAU This function must be able to access kube-proxy running on the node, so running in non-hostNetwork doesn't work at all. You didn't see a problem because apparently RunHostCmd doesn't return an error when the curl command times out or gets a connection refused. So basically the test was then going on assuming it's not in user proxy mode. How is kube-proxy done in Windows, given there is no iptables? Does it run the user space proxy? If so then an "if windows, return userspace" might be the right solution for this function.
Alternately, the issue is that Windows doesn't support hostNetwork, and we need to talk to kube-proxy in the host network namespace in order to determine the proxy mode. So how do we get this info without hostNetwork? Does kube-proxy only make status available on localhost, or could we get it by passing status.hostIP via the downward API? If we can do that, then the pod can get this info using that IP instead of localhost.
There was a problem hiding this comment.
Will remove this from the PR for the time being. Didn't notice that the test actually skips if it doesn't have 2 Ready nodes, so I've missed this.
There was a problem hiding this comment.
Multiple nodes are required now.
No conformance tests should have Skips in them. If they do, they cannot be promoted.
True, but I cannot reopen that PR for some issue, I would have otherwise. As for the comments, I should reply to them, but as you can see in this PR's pastes, I've run those tests on Linux with different networking plugins (azure-vnet-cni, flannel overlay, flannel l2bridge) and they passed. |
It is important to ensure that the test not only passes, but also that it verifies what it should be. Specifically for that That |
94ae4a3 to
90b41e5
Compare
timothysc
left a comment
There was a problem hiding this comment.
I'm going to defer to @kubernetes/sig-node-pr-reviews
/assign @johnbelamaric
|
/cc @lzang |
|
@yujuhong: GitHub didn't allow me to request PR reviews from the following users: lzang. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn 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. |
johnbelamaric
left a comment
There was a problem hiding this comment.
In general, YES to removing hostNetwork from these intra-pod and node-pod tests. With hostNetwork enabled they don't even really test what they were supposed to be testing. But we need to figure out what to do about ProxyMode which definitely doesn't work as written when run in hostNetwork: false
test/e2e/framework/util.go
Outdated
There was a problem hiding this comment.
@BCLAU This function must be able to access kube-proxy running on the node, so running in non-hostNetwork doesn't work at all. You didn't see a problem because apparently RunHostCmd doesn't return an error when the curl command times out or gets a connection refused. So basically the test was then going on assuming it's not in user proxy mode. How is kube-proxy done in Windows, given there is no iptables? Does it run the user space proxy? If so then an "if windows, return userspace" might be the right solution for this function.
Alternately, the issue is that Windows doesn't support hostNetwork, and we need to talk to kube-proxy in the host network namespace in order to determine the proxy mode. So how do we get this info without hostNetwork? Does kube-proxy only make status available on localhost, or could we get it by passing status.hostIP via the downward API? If we can do that, then the pod can get this info using that IP instead of localhost.
|
/priority important-soon |
|
/sig network |
90b41e5 to
b9c4858
Compare
|
/test pull-kubernetes-e2e-gce |
|
As an update Bug triage had the incorrect date. Freeze is Nov 14. |
|
ping @johnbelamaric |
|
I will block out some time on Friday. |
|
Ok. I think I have figured out why this is so confusing. It comes down to that PR #71468 should not have been merged as it is written. It separates "host neworking" from the Instead, it should have just added a boolean that defined whether or not to create the So, I cannot approve this. In fact, we should go back and fix the others, I could approve something that doesn't create the |
|
@alejandrox1 @johnbelamaric : Should this be bumped to 1.18? -Bug Triage Team |
|
yes, probably that would make sense. |
|
/milestone v1.18 |
c1d9a6d to
6b00ba4
Compare
236ade1 to
41760d2
Compare
|
/test pull-kubernetes-e2e-kind |
41760d2 to
6ed08f1
Compare
Some tests are setting HostNetwork=true, even if it is not required for them to pass. This patch will set the HostNetwork to false for those tests, allowing them to be run on Windows nodes as well.
|
Not sure why it says approved from me, going to make sure that's cancelled until I hear back on my most recent comments. /approve cancel |
Yeah, sorry. I've addressed your comments, but haven't commented on it.
This PR now removes
Added.
Done. |
6ed08f1 to
e465e10
Compare
|
@johnbelamaric So, is it alright with you now? |
|
Yes! |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: claudiubelu, johnbelamaric, spiffxp The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind failing-test
/sig testing
What this PR does / why we need it:
Some tests are setting HostNetwork=true, even if it is not required for them to pass.
This patch will set the HostNetwork to false for those tests, allowing them to be run on Windows nodes as well.
Running the tests affected by this PR on Linux nodes on different environments, yielded the following results:
Which issue(s) this PR fixes:
Fixes #69559
Original PR: #69525
Special notes for your reviewer:
Does this PR introduce a user-facing change?: