-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix --wait's failure to work on coredns pods #19748
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ComradeProgrammer The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
kvm2 driver with docker runtime
Times for minikube start: 48.8s 48.7s 159.0s 48.5s 47.4s Times for minikube ingress: 14.5s 14.9s 14.4s 15.0s 14.5s docker driver with docker runtime
Times for minikube start: 23.9s 20.5s 20.7s 20.7s 21.7s Times for minikube ingress: 10.3s 12.7s 13.2s 12.2s 12.7s docker driver with containerd runtime
Times for minikube start: 19.9s 22.5s 19.6s 22.4s 19.6s Times for minikube ingress: 22.8s 39.3s 24.2s 23.3s 23.3s |
Here are the number of top 10 failed tests in each environments with lowest flake rate.
Besides the following environments also have failed tests:
To see the flake rates of all tests by environment, click here. |
hey @ComradeProgrammer thanks for looking into this here's a bit more context that might help you: wait for system-critical pods' Ready condition implementation was intentionally made alongside the Running checks, ie, the former would be called only if so, as the ExpectAppsRunning is called by on the other hand, only if wait is required, WaitExtra is called by also, for ha + wait, iirc the idea was that we'd be ok with waiting for at least one coredns pod to be ready, as the kube-dns service would take care of routing requests to the pod(s) that can process them example from #19288 shows only one coredns, so it's not a ha cluster, but makes a very good point:
i think that the fix should be made in as for |
FIX #19288
Before:
minikube start --wait=all
may end when coredns is not readyAfter:
minikube start --wait=all
will be able to wait until coredns is completly readyThe situation mentioned in #19288 was actually introduced by the HA-cluster PR. By default coredns has a deployment consists 2 coredns pods. However in pkg/minikube/node/start.go:158 it was manyally scaled down to 1. This happens before we start to wait for those essential nodes(minikube waits for nodes at line 236).
When minikube waits for system pods, there were 2 checks which will check the system pods's status:
After the HA-cluster PR was introduced, when minikube run WaitExtra funtion(the 1st check), one of the coredns pod's status can be Succeed. WaitExtra don't recognize this state and will print an error and break the checking loop. This logic is written at pkg/minikube/bootstrapper/bsutil/kverify/pod_ready.go line 99 and line 69.
The error I see is
The when minikube arrives at ExpectAppsRunning(the 2nd check), it doesn't check the ready state, so it believes that all pods are ok. This causes the #19288
So the fix is to make ExpectAppsRunning(the 2nd check) check the ready state as well.
(The reason why I didn't make the 1st check function to recognized the Succeed state is that: if for some reason there is a job (e.g. init job for some containers) in kube-system namespace, and we change the WaitExtra's logic to reject Succeed state, there will be problems.)