kubernetes: [Flaking Test] [sig-network] Networking Granular Checks: Services should update endpoints: http (gce-ubuntu-master-containerd,master-blocking)
Which jobs are flaking?
gce-ubuntu-master-containerd
Which tests are flaking?
Kubernetes e2e suite.[It] [sig-network] Networking Granular Checks: Services should update endpoints: http
Since when has it been flaking?
03-06 (intermittently)
Testgrid link
https://testgrid.k8s.io/sig-release-master-blocking#gce-ubuntu-master-containerd
Reason for failure (if possible)
{ failed [FAILED] failed dialing endpoint (recovery), did not find expected responses... Tries 46 Command curl -g -q -s 'http://10.64.2.79:9080/dial?request=hostname&protocol=http&host=10.0.6.39&port=80&tries=1' retrieved map[bootstrap-e2e-minion-group-5dtl:{} netserver-1:{} netserver-2:{} netserver-3:{}] expected map[netserver-1:{} netserver-2:{} netserver-3:{}] In [It] at: k8s.io/kubernetes/test/e2e/network/networking.go:341 @ 03/06/24 01:32:57.492 }
Anything else we need to know?
multiple failures observed intermittently in the Traige dashboard: https://storage.googleapis.com/k8s-triage/index.html?test=Services should update endpoints
Relevant SIG(s)
/sig network release
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 64 (64 by maintainers)
Commits related to this issue
- e2e/network: stream pod logs for debugging Intermittent logging to understand root cause of https://github.com/kubernetes/kubernetes/issues/123760 Signed-off-by: Daman Arora <aroradaman@gmail.com> — committed to aroradaman/kubernetes by aroradaman 3 years ago
- e2e/network: stream pod logs for debugging Intermittent logging to understand root cause of https://github.com/kubernetes/kubernetes/issues/123760 Signed-off-by: Daman Arora <aroradaman@gmail.com> — committed to aroradaman/kubernetes by aroradaman 3 years ago
- e2e/network: stream pod logs for debugging Intermittent logging to understand root cause of https://github.com/kubernetes/kubernetes/issues/123760 Signed-off-by: Daman Arora <aroradaman@gmail.com> — committed to aroradaman/kubernetes by aroradaman 3 years ago
- e2e/network: stream pod logs for debugging Intermittent logging to understand root cause of https://github.com/kubernetes/kubernetes/issues/123760 Signed-off-by: Daman Arora <aroradaman@gmail.com> — committed to aroradaman/kubernetes by aroradaman 3 years ago
- e2e/network: stream pod logs for debugging Intermittent logging to understand root cause of https://github.com/kubernetes/kubernetes/issues/123760 Signed-off-by: Daman Arora <aroradaman@gmail.com> — committed to nokia/kubernetes by aroradaman 3 years ago
- Merge pull request #126201 from aroradaman/revert-debug-steps Revert debug steps and logs for #123760 — committed to kubernetes/kubernetes by k8s-ci-robot 2 years ago
the request goes to the clusterip, and the endpoints are the same as they didn’t change, hence the request has to be sent to the same PodIP, no?
Daman example is with IPVS, let’s see one with iptables https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-containerd-e2e-ubuntu-gce/1786906482093068288
Bad request at 00:05:29.9824
The request is done from
test-container-pod: {kubelet bootstrap-e2e-minion-group-pmh5}so those are the kube-proxy logs we are interested, as the iptables rules will swap the cluster ip 10.0.225.118 to the endpoint ip in that hostThe endpoints for the service are programmed at
and updated with the endpoint removal at 00:05:30
The IP removed was 10.64.3.174, so netserver-0 should have that IP, we need to validate that in the kubelet or containerd logs. Containerd logs here The node were the Pod deleted is running
10.64.3.174 is assigned two times, but the second time is at
00:11:01.250407sandbox 51a122a6746dff47eb22db55e355a468e89118d22e280cb87f1606f738a18370 is
io.kubernetes.cri.sandbox-namespace:nettest-8396andio.kubernetes.cri.sandbox-name:netserver-0is
io.kubernetes.cri.sandbox-name:pod2and ``io.kubernetes.cri.sandbox-namespace:services-7021 `The pod sandbox is removed at 00:05:22.031109
that seems to match the pod logs
however, there are still more events in containerd removing the mentioning sandbox that sounds weird,
and the container is not completely removed until later, it may happen then CNI DEL didn’t work and the Pod is still alive until
05T00:05:52.1877?The kubelet consider the pod killed at 00:05:23.218742
The last message from that pod uid
4bc1c6ce-de7c-4134-b2f8-70c670646de7is atThe way GCE jobs setup the network using the containerd cni template
that use the ptp plugin
https://github.com/kubernetes/kubernetes/blob/ade0d2140a68a69f5343c865792393a83c76ca6a/cluster/gce/gci/configure-helper.sh#L3226-L3252
Installing a route to the podIP through the associated veth, example from other environment
@danwinship theory is also possible, the hostNetwork test runs at that time
EDIT:
or that both things are happening, the containerd network teardown is not happening at that time so the PodIP is still available somehow and the hostnetwork pods is taking that request
not blocking, the help I need from the Node team is to understand how a process running in a namespace is able to reply with the hostname of the host namespace, is like in deletion/stop of the container something happens with the namespaces, and the process still runs in the network namespace but the UTS namespace is the one from the host …
/reopen
This is the right issue @wendy-ha18 for https://github.com/kubernetes/kubernetes/issues/125228#issuecomment-2598420192 , I’m sorry I mislead you, the other issue is unrelated
The error is misleading, if we scroll up in the logs we see the failures is beceause can not find containerd socket
A heisenbug?
Since the returned hostname if from the node, my bet is on a server running with
hostNetwork:true. That could well happen with the race described in https://github.com/kubernetes/kubernetes/issues/121245, but that assumes that the service IP exist on some interface on the node. It does for proxy-mode=ipvs onkube-ipvs0, but what if there are other cases, or akube-ipvs0from an older run lingers.where do we know that from?
but earlier:
How exactly do pod IPs work on gce? Is it possible that immediately after a pod gets deleted, that traffic to that pod’s IP could accidentally get delivered somewhere else? In most circumstances that might not get noticed if the pods aren’t listening on the same ports, but all of the
e2enetwork..NewNetworkingTestConfig()-based tests use the same ports…(What other tests were running concurrently with the failed test?)
Lars, it happens for
iptablesmode as well./assign @aojea
This is really weird, maybe there is something more worrisome behind
hmmm @pacoxu this only happens with master containerd
and stopped to happen last 4 days
https://storage.googleapis.com/k8s-triage/index.html?text=minion&test=Services should update endpoints
maybe related to this https://github.com/containerd/containerd/pull/9999/
The testgrid does not have any recent failure in the last 5 days too https://testgrid.k8s.io/sig-release-master-blocking#gce-ubuntu-master-containerd&include-filter-by-regex=should update endpoints&width=20
I’m going to close as:
/close
please reopen if it happen again, IMPORTANT, the failure has to have the hostname in the map
bootstrap-e2e-minion-group-5dtin this caseAnalyzing two occurrences we can see that the problem happens on the pod that is being removed
netserver-0, it has a conflict on the endpoint update , and it picks the hostname of the host where that pod was runnninghttps://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-containerd-e2e-ubuntu-gce/1776408965454761984
https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-containerd-e2e-ubuntu-gce/1776347560789676032
Talked with @danwinship offline about this, there are 2 possible theories
https://github.com/kubernetes/kubernetes/blob/9791f0d1f39f3f1e0796add7833c1059325d5098/test/e2e/network/networking.go#L328-L343
These are the kube-proxy logs on the time things happen
other one here https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/124161/pull-kubernetes-e2e-gci-gce-ipvs/1775434062043811840
This looks worrysome, the fact we get a different endpoint , I was checking the kube-proxy logs and I don’t see anything suspicious, it also fails with ipvs that may indicate the problem is not in the implementation … can be that the terminated pod answers with the host hostname during termination?
/priority important-soon