Skip to content

o-apiserver-o is stuck in leader election #661

@lance5890

Description

@lance5890
  • co status show as follows:
False       True          False      7h42m   APIServerDeploymentAvailable: deployment/openshift-apiserver: could not be retrieved
  • the pod status and log show as:
kubectl get po -n openshift-apiserver-operator
NAME                                       READY   STATUS    RESTARTS        AGE
openshift-apiserver-operator-665b95754d-v6j4s   1/1     Running   1 (6d18h ago)   6d18h

I1208 22:52:58.707290       1 request.go:697] Waited for 1.004103133s due to client-side throttling, not priority and fairness, request: GET:https://21.101.0.1:443/apis/template.openshift.io/v1
E1209 02:56:49.251172       1 base_controller.go:268] openshiftAPIServerWorkloadController reconciliation failed: "deployments": invalid dependency reference: "rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:37388->127.0.0.1:2379: read: connection reset by peer"
I1209 02:56:49.265307       1 status_controller.go:218] clusteroperator/openshift-apiserver diff {"status":{"conditions":[{"lastTransitionTime":"2025-12-02T15:53:21Z","message":"APIServerDeploymentDegraded: deployment/openshift-apiserver: could not be retrieved\nAPIServerWorkloadDegraded: \"deployments\": invalid dependency reference: \"rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:37388-\u003e127.0.0.1:2379: read: connection reset by peer\"\nAPIServerWorkloadDegraded: ","reason":"AsExpected","status":"False","type":"Degraded"},{"lastTransitionTime":"2025-12-09T02:56:49Z","message":"APIServerDeploymentProgressing: deployment/openshift-apiserver: could not be retrieved","reason":"APIServerDeployment_NoDeployment","status":"True","type":"Progressing"},{"lastTransitionTime":"2025-12-09T02:56:49Z","message":"APIServerDeploymentAvailable: deployment/openshift-apiserver: could not be retrieved","reason":"APIServerDeployment_NoDeployment","status":"False","type":"Available"},{"lastTransitionTime":"2025-12-02T15:51:08Z","message":"All is well","reason":"AsExpected","status":"True","type":"Upgradeable"},{"lastTransitionTime":"2025-12-02T15:51:08Z","reason":"NoData","status":"Unknown","type":"EvaluationConditionsDetected"}]}}
I1209 02:56:49.278845       1 event.go:364] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-apiserver-operator", Name:"openshift-apiserver-operator", UID:"8b6b6311-b57c-4fdd-8e0a-ad1148f18af4", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'OperatorStatusChanged' Status for clusteroperator/openshift-apiserver changed: Degraded message changed from "All is well" to "APIServerDeploymentDegraded: deployment/openshift-apiserver: could not be retrieved\nAPIServerWorkloadDegraded: \"deployments\": invalid dependency reference: \"rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:37388->127.0.0.1:2379: read: connection reset by peer\"\nAPIServerWorkloadDegraded: ",Progressing changed from False to True ("APIServerDeploymentProgressing: deployment/openshift-apiserver: could not be retrieved"),Available changed from True to False ("APIServerDeploymentAvailable: deployment/openshift-apiserver: could not be retrieved")
E1209 02:57:51.307701       1 leaderelection.go:332] error retrieving resource lock openshift-apiserver-operator/openshift-apiserver-operator-lock: the server was unable to return a response in the time allotted, but may still be processing the request (get leases.coordination.k8s.io openshift-apiserver-operator-lock)
E1209 02:57:56.569779       1 base_controller.go:268] auditPolicyController reconciliation failed: the server was unable to return a response in the time allotted, but may still be processing the request (get configmaps audit)
E1209 02:58:25.218545       1 base_controller.go:268] NamespaceFinalizerController_openshift-apiserver reconciliation failed: the server was unable to return a response in the time allotted, but may still be processing the request (get namespaces openshift-apiserver)
E1209 02:58:38.307584       1 leaderelection.go:332] error retrieving resource lock openshift-apiserver-operator/openshift-apiserver-operator-lock: Get "https://21.101.0.1:443/apis/coordination.k8s.io/v1/namespaces/openshift-apiserver-operator/leases/openshift-apiserver-operator-lock?timeout=1m47s": context deadline exceeded
I1209 02:58:38.307628       1 leaderelection.go:285] failed to renew lease openshift-apiserver-operator/openshift-apiserver-operator-lock: timed out waiting for the condition
E1209 02:58:45.315005       1 leaderelection.go:308] Failed to release lock: rpc error: code = DeadlineExceeded desc = context deadline exceeded
W1209 02:58:45.315172       1 leaderelection.go:84] leader election lost

need more investigation( i will post more when i get some clue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions