apecloud / kubeblocks

KubeBlocks is an open-source control plane software that runs and manages databases, message queues and other stateful applications on K8s.
https://kubeblocks.io
GNU Affero General Public License v3.0
2.08k stars 170 forks source link

[BUG] redis cluster role is all primary create via ipv6 #6899

Open JashBook opened 6 months ago

JashBook commented 6 months ago

Describe the bug

kbcli version
Kubernetes: v1.21.0
KubeBlocks: 0.8.3-beta.2
kbcli: 0.8.2

To Reproduce Steps to reproduce the behavior:

  1. create cluster
    kbcli cluster create  redis redis --mode='replication' --cpu=0.5 --memory=0.5  --storage=1 --availability-policy=none --termination-policy=Delete --monitoring-interval=0 --version=redis-7.0.6  --replicas=2
  2. See error
    
    kbcli cluster list-instances -n default redis
    NAME                     NAMESPACE   CLUSTER   COMPONENT        STATUS    ROLE      ACCESSMODE   AZ       CPU(REQUEST/LIMIT)   MEMORY(REQUEST/LIMIT)           STORAGE     NODE                                                             CREATED-TIME                 
    redis-redis-0            default     redis     redis            Running   primary   <none>       <none>   500m / 500m          512Mi / 512Mi                   data:1Gi    izj6c0fefwrwyyuv03vpzuz/240b:4001:233:ff00:9e65:d8aa:6597:2a79   Mar 27,2024 17:20 UTC+0800   
    redis-redis-1            default     redis     redis            Running   primary   <none>       <none>   500m / 500m          512Mi / 512Mi                   data:1Gi    izj6c0fefwrwyyuv03vpztz/240b:4001:233:ff00:9e65:d8aa:6597:2a7b   Mar 27,2024 17:20 UTC+0800   
    redis-redis-sentinel-0   default     redis     redis-sentinel   Running   <none>    <none>       <none>   200m / 200m          214748364800m / 214748364800m   data:20Gi   izj6c0fefwrwyyuv03vpztz/240b:4001:233:ff00:9e65:d8aa:6597:2a7b   Mar 27,2024 17:20 UTC+0800   
    redis-redis-sentinel-1   default     redis     redis-sentinel   Running   <none>    <none>       <none>   200m / 200m          214748364800m / 214748364800m   data:20Gi   izj6c0fefwrwyyuv03vpztz/240b:4001:233:ff00:9e65:d8aa:6597:2a7b   Mar 27,2024 17:20 UTC+0800   
    redis-redis-sentinel-2   default     redis     redis-sentinel   Running   <none>    <none>       <none>   200m / 200m          214748364800m / 214748364800m   data:20Gi   izj6c0fefwrwyyuv03vpztz/240b:4001:233:ff00:9e65:d8aa:6597:2a7b   Mar 27,2024 17:20 UTC+0800   

log pod lorry

kubectl logs -ndefault redis-redis-0 lorry 2024-03-27T09:20:49Z INFO Initialize DB manager 2024-03-27T09:20:49Z INFO KB_WORKLOAD_TYPE ENV not set 2024-03-27T09:20:49Z INFO Volume-Protection succeed to init volume protection {"pod": "redis-redis-0", "spec": {"highWatermark":"0","volumes":[]}} 2024-03-27T09:20:49Z INFO HTTPServer Starting HTTP Server 2024-03-27T09:20:58Z INFO Redis DB startup ready 2024-03-27T09:20:58Z INFO DCS-K8S pod selector: app.kubernetes.io/instance=redis,app.kubernetes.io/managed-by=kubeblocks,apps.kubeblocks.io/component-name=redis 2024-03-27T09:20:58Z INFO DCS-K8S podlist: 2 2024-03-27T09:20:58Z INFO DCS-K8S Leader configmap is not found {"configmap": "redis-redis-leader"} 2024-03-27T09:20:58Z INFO event send event: map[event:Success operation:checkRole originalRole: role:primary]

kubectl logs -ndefault redis-redis-1 lorry 2024-03-27T09:20:54Z INFO Initialize DB manager 2024-03-27T09:20:54Z INFO KB_WORKLOAD_TYPE ENV not set 2024-03-27T09:20:54Z INFO Volume-Protection succeed to init volume protection {"pod": "redis-redis-1", "spec": {"highWatermark":"0","volumes":[]}} 2024-03-27T09:20:54Z INFO HTTPServer Starting HTTP Server 2024-03-27T09:20:58Z INFO Redis DB startup ready 2024-03-27T09:20:58Z INFO DCS-K8S pod selector: app.kubernetes.io/instance=redis,app.kubernetes.io/managed-by=kubeblocks,apps.kubeblocks.io/component-name=redis 2024-03-27T09:20:58Z INFO DCS-K8S podlist: 2 2024-03-27T09:20:58Z INFO DCS-K8S Leader configmap is not found {"configmap": "redis-redis-leader"} 2024-03-27T09:20:58Z INFO event send event: map[event:Success operation:checkRole originalRole: role:primary]

logs sentinel

kubectl logs -n default redis-redis-sentinel-0

kubectl logs -n default redis-redis-sentinel-2

kubectl logs kb-post-provision-job-redis-redis-tpqqd -n default -f

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):

Additional context Add any other context about the problem here.

github-actions[bot] commented 5 months ago

This issue has been marked as stale because it has been open for 30 days with no activity