-
Notifications
You must be signed in to change notification settings - Fork 716
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
When filtering etcd or api-server pods, the readiness status of the pods was not checked. #3021
Comments
you need to provide more information. |
func getRawEtcdEndpointsFromPodAnnotationWithoutRetry(client clientset.Interface) ([]string, int, error) {
klog.V(3).Infof("retrieving etcd endpoints from %q annotation in etcd Pods", constants.EtcdAdvertiseClientUrlsAnnotationKey)
podList, err := client.CoreV1().Pods(metav1.NamespaceSystem).List(
context.TODO(),
metav1.ListOptions{
LabelSelector: fmt.Sprintf("component=%s,tier=%s", constants.Etcd, constants.ControlPlaneTier),
},
)
if err != nil {
return []string{}, 0, err
}
etcdEndpoints := []string{}
for _, pod := range podList.Items {
etcdEndpoint, ok := pod.ObjectMeta.Annotations[constants.EtcdAdvertiseClientUrlsAnnotationKey]
if !ok {
klog.V(3).Infof("etcd Pod %q is missing the %q annotation; cannot infer etcd advertise client URL using the Pod annotation", pod.ObjectMeta.Name, constants.EtcdAdvertiseClientUrlsAnnotationKey)
continue
}
etcdEndpoints = append(etcdEndpoints, etcdEndpoint)
}
return etcdEndpoints, len(podList.Items), nil
} we can see the code above. it doesn't check the ready status of pod. @neolit123 |
why is it a problem that we need to fix? |
see the above. shall we add the unhealth pod as etcd node? @neolit123 thanks so much. |
i think getRawEtcdEndpointsFromPodAnnotationWithoutRetry is supposed to get the annotations even if the pod is not ready. readyness is checked during upgrade. are you seeing this as an actual problem on your clusters? |
@neolit123 make sense. maybe we can log something to nitice user? |
we could log with |
Yeah. It's ok for now. I will do that. Alright? Thanks So much @neolit123 |
What keywords did you search in kubeadm issues before filing this one?
If you have found any duplicates, you should instead reply there and close this page.
If you have not found any duplicates, delete this section and continue on.
Is this a BUG REPORT or FEATURE REQUEST?
Choose one: BUG REPORT or FEATURE REQUEST
BUG
Versions
kubeadm version (use
kubeadm version
): allEnvironment:
kubectl version
):uname -a
):What happened?
When filtering etcd or api-server pods, the readiness status of the pods was not checked.
What you expected to happen?
When filtering etcd or api-server pods, the readiness status of the pods was checked.
How to reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
The text was updated successfully, but these errors were encountered: