kubeblocks icon indicating copy to clipboard operation
kubeblocks copied to clipboard

[BUG]Etcd cluster is always creating

Open haowen159 opened this issue 6 months ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

kbcli version
Kubernetes: v1.28.11-gke.1019001
KubeBlocks: 1.0.0-alpha.1
kbcli: 1.0.0-alpha.0

To Reproduce Steps to reproduce the behavior:

  1. cluster yaml
apiVersion: apps.kubeblocks.io/v1alpha1
kind: Cluster
metadata:
  name: etcd-cluster
  namespace: default
spec:
  terminationPolicy: Delete
  componentSpecs:
  - name: etcd
    componentDef: etcd-1.0.0-alpha.0
    serviceAccountName: kb-etcd-cluster
    replicas: 3
    resources:
      limits:
        cpu: '0.5'
        memory: 0.5Gi
      requests:
        cpu: '0.5'
        memory: 0.5Gi
    volumeClaimTemplates:
    - name: data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi

2.cluster status:

 k get cluster
NAME           CLUSTER-DEFINITION   VERSION   TERMINATION-POLICY   STATUS     AGE
etcd-cluster                                  Delete               Creating   13m
k get pod -l app.kubernetes.io/instance=etcd-cluster
NAME                  READY   STATUS    RESTARTS   AGE
etcd-cluster-etcd-0   2/2     Running   0          13m
etcd-cluster-etcd-1   2/2     Running   0          13m
etcd-cluster-etcd-2   2/2     Running   0          13m
 k get cmp -l app.kubernetes.io/instance=etcd-cluster
NAME                DEFINITION           SERVICE-VERSION   STATUS     AGE
etcd-cluster-etcd   etcd-1.0.0-alpha.0   v3.5.6            Creating   14m

3.logs

k logs etcd-cluster-etcd-2 -c lorry
2024-08-07T02:25:24Z    INFO    Initialize DB manager
2024-08-07T02:25:24Z    INFO    KB_WORKLOAD_TYPE ENV not set
2024-08-07T02:25:24Z    INFO    Volume-Protection       succeed to init volume protection       {"pod": "etcd-cluster-etcd-2", "spec": {"highWatermark":"0","volumes":[]}}
2024-08-07T02:25:24Z    INFO    HTTPServer      Starting HTTP Server
2024-08-07T02:25:24Z    INFO    HTTPServer      API route path  {"method": "POST", "path": ["/v1.0/joinmember", "/v1.0/createuser", "/v1.0/checkrunning", "/v1.0/leavemember", "/v1.0/lockinstance", "/v1.0/exec", "/v1.0/switchover", "/v1.0/dataload", "/v1.0/volumeprotection", "/v1.0/postprovision", "/v1.0/rebuild", "/v1.0/grantuserrole", "/v1.0/revokeuserrole", "/v1.0/preterminate", "/v1.0/datadump", "/v1.0/getlag", "/v1.0/deleteuser", "/v1.0/unlockinstance"]}
2024-08-07T02:25:24Z    INFO    HTTPServer      API route path  {"method": "GET", "path": ["/v1.0/healthycheck", "/v1.0/query", "/v1.0/getrole", "/v1.0/listusers", "/v1.0/listsystemaccounts", "/v1.0/checkrole", "/v1.0/describeuser"]}
2024-08-07T02:25:24Z    INFO    cronjobs        env is not set  {"env": "KB_CRON_JOBS"}
2024-08-07T02:25:30Z    INFO    DCS-K8S pod selector: app.kubernetes.io/instance=etcd-cluster,app.kubernetes.io/managed-by=kubeblocks,apps.kubeblocks.io/component-name=etcd
2024-08-07T02:25:30Z    INFO    DCS-K8S podlist: 3
2024-08-07T02:25:30Z    INFO    DCS-K8S Leader configmap is not found   {"configmap": "etcd-cluster-etcd-leader"}
2024-08-07T02:25:30Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:25:30Z    INFO    checkrole       role checks failed continuously {"times": 0}
2024-08-07T02:25:30Z    INFO    event   send event: map[operation:checkRole originalRole:waitForStart]
2024-08-07T02:25:31Z    INFO    event   send event success      {"message": "{\"operation\":\"checkRole\",\"originalRole\":\"waitForStart\"}"}
2024-08-07T02:25:40Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:25:50Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:26:00Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:26:10Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:26:20Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:26:30Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:26:40Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:26:50Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:27:00Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:27:10Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:27:20Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:27:30Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:27:40Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:27:50Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:28:00Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:28:10Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:28:20Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:28:30Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:28:40Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:28:50Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:29:00Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:29:10Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:29:20Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:29:30Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:29:40Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:29:50Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}
2024-08-07T02:30:00Z    INFO    checkrole       executing checkRole error       {"error": "role probe commands is empty!"}

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

haowen159 avatar Aug 07 '24 02:08 haowen159