-
Notifications
You must be signed in to change notification settings - Fork 240
Open
Description
Describe the bug
A clear and concise description of what the bug is.
kbcli version
Kubernetes: v1.30.4-vke.10
KubeBlocks: 1.1.0-alpha.3
kbcli: 1.0.1
helm get notes -n kb-system kb-addon-redis
NOTES:
Release Information:
Commit ID: "123bcbfedf382f6b55f485b2e2e4e36c9490c584"
Commit Time: "2025-10-31 14:53:49 +0800"
Release Branch: "v1.1.0-alpha.3"
Release Time: "2025-11-03 17:02:04 +0800"
Enterprise: "false"
To Reproduce
Steps to reproduce the behavior:
- create cluster
helm template rc addons-cluster/redis
---
# Source: redis-cluster/templates/cluster.yaml
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: rc
namespace: default
labels:
helm.sh/chart: redis-cluster-1.1.0-alpha.0
app.kubernetes.io/version: "7.2.7"
app.kubernetes.io/instance: rc
annotations:
apps.kubeblocks.io/mode: cluster
spec:
terminationPolicy: Delete
clusterDef: redis
topology: cluster
shardings:
- name: shard
shards: 3
template:
name: redis
componentDef: redis-cluster
replicas: 2
disableExporter: true
serviceVersion: 7.2.10
systemAccounts:
- name: default
passwordConfig:
length: 10
numDigits: 5
numSymbols: 0
letterCase: MixedCases
seed: rc
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
- See error
kubectl get cluster rc
NAME CLUSTER-DEFINITION TERMINATION-POLICY STATUS AGE
rc redis Delete Creating 11m
➜ ~
➜ ~ kbcli cluster list-instances rc
NAME NAMESPACE CLUSTER COMPONENT STATUS ROLE ACCESSMODE AZ CPU(REQUEST/LIMIT) MEMORY(REQUEST/LIMIT) STORAGE NODE CREATED-TIME
rc-shard-2bv-0 default rc shard(shard-2bv) Running primary cn-guangzhou-a 500m / 500m 512Mi / 512Mi data:20Gi 192.168.0.57/192.168.0.57 Nov 04,2025 14:32 UTC+0800
rc-shard-2bv-1 default rc shard(shard-2bv) Running primary cn-guangzhou-a 500m / 500m 512Mi / 512Mi data:20Gi 192.168.0.92/192.168.0.92 Nov 04,2025 14:34 UTC+0800
rc-shard-fgl-0 default rc shard(shard-fgl) Running primary cn-guangzhou-a 500m / 500m 512Mi / 512Mi data:20Gi 192.168.0.57/192.168.0.57 Nov 04,2025 14:32 UTC+0800
rc-shard-fgl-1 default rc shard(shard-fgl) Running primary cn-guangzhou-a 500m / 500m 512Mi / 512Mi data:20Gi 192.168.0.92/192.168.0.92 Nov 04,2025 14:34 UTC+0800
rc-shard-pxz-0 default rc shard(shard-pxz) Running primary cn-guangzhou-a 500m / 500m 512Mi / 512Mi data:20Gi 192.168.0.57/192.168.0.57 Nov 04,2025 14:32 UTC+0800
rc-shard-pxz-1 default rc shard(shard-pxz) Running primary cn-guangzhou-a 500m / 500m 512Mi / 512Mi data:20Gi 192.168.0.92/192.168.0.92 Nov 04,2025 14:34 UTC+0800
kubectl get cmp
NAME DEFINITION SERVICE-VERSION STATUS AGE
rc-shard-2bv redis-cluster-7-1.1.0-alpha.0 7.2.10 Creating 12m
rc-shard-fgl redis-cluster-7-1.1.0-alpha.0 7.2.10 Creating 12m
rc-shard-pxz redis-cluster-7-1.1.0-alpha.0 7.2.10 Creating 12m
describe cmp
kubectl describe cmp rc-shard-2bv
Name: rc-shard-2bv
Namespace: default
Labels: app.kubernetes.io/component=redis-cluster-7-1.1.0-alpha.0
app.kubernetes.io/instance=rc
app.kubernetes.io/managed-by=kubeblocks
apps.kubeblocks.io/component-name=shard-2bv
apps.kubeblocks.io/sharding-name=shard
componentdefinition.kubeblocks.io/name=redis-cluster-7-1.1.0-alpha.0
Annotations: apps.kubeblocks.io/cluster-uid: 39afea93-8da2-49e0-bb3d-fb6b6adbbfe7
kubeblocks.io/crd-api-version: apps.kubeblocks.io/v1
kubeblocks.io/generation: 2
API Version: apps.kubeblocks.io/v1
Kind: Component
Metadata:
Creation Timestamp: 2025-11-04T06:32:09Z
Finalizers:
cluster.kubeblocks.io/finalizer
component.kubeblocks.io/finalizer
Generation: 2
Owner References:
API Version: apps.kubeblocks.io/v1
Block Owner Deletion: true
Controller: true
Kind: Cluster
Name: rc
UID: 39afea93-8da2-49e0-bb3d-fb6b6adbbfe7
Resource Version: 50037
UID: 5c88d82b-b0ec-451c-9580-567b88a9816a
Spec:
Comp Def: redis-cluster-7-1.1.0-alpha.0
Configs:
Config Map:
Name: rc-shard-2bv-redis-cluster-config
Name: redis-cluster-config
Disable Exporter: true
Flat Instance Ordinal: false
Pod Update Policy: PreferInPlace
Replicas: 2
Resources:
Limits:
Cpu: 500m
Memory: 512Mi
Requests:
Cpu: 500m
Memory: 512Mi
Service Version: 7.2.10
System Accounts:
Disabled: false
Name: default
Password Config:
Length: 10
Letter Case: MixedCases
Num Digits: 5
Num Symbols: 0
Seed: rc
Termination Policy: Delete
Volume Claim Templates:
Name: data
Spec:
Access Modes:
ReadWriteOnce
Resources:
Requests:
Storage: 20Gi
Status:
Conditions:
Last Transition Time: 2025-11-04T06:32:09Z
Message: The operator has started the provisioning of Cluster: rc-shard-2bv
Observed Generation: 2
Reason: PreCheckSucceed
Status: True
Type: ProvisioningStarted
Last Transition Time: 2025-11-04T06:32:11Z
Message: the component phase is Creating
Observed Generation: 2
Reason: Unavailable
Status: False
Type: Available
Observed Generation: 2
Phase: Creating
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning Warning 12m (x4 over 12m) component-controller config/script template has no template specified: redis-cluster-config
Warning Warning 8m38s (x12 over 12m) component-controller requeue after: 10s as: wait for lifecycle action precondition: action precondition is not matched: runtime is not ready
logs kbagent
kubectl logs rc-shard-2bv-0 kbagent
2025-11-04T06:33:56Z INFO create service Action {"actions": "postProvision,preTerminate,switchover,memberLeave,roleProbe"}
2025-11-04T06:33:56Z INFO create service Probe {"probes": "roleProbe"}
2025-11-04T06:33:56Z INFO create service Streaming {"actions": ""}
2025-11-04T06:33:56Z INFO service Action started...
2025-11-04T06:33:56Z INFO service Probe started...
2025-11-04T06:33:56Z INFO service Streaming started...
2025-11-04T06:33:56Z INFO starting the HTTP server
2025-11-04T06:33:56Z INFO register service to server {"service": "Action", "method": "POST", "uri": "/v1.0/action"}
2025-11-04T06:33:56Z INFO register service to server {"service": "Probe", "method": "POST", "uri": "/v1.0/probe"}
2025-11-04T06:33:56Z INFO register service to server {"service": "Streaming", "method": "POST", "uri": "/v1.0/streaming"}
2025-11-04T06:33:56Z INFO starting the streaming server
2025-11-04T06:33:56Z INFO probe started {"probe": "roleProbe", "config": {"instance":"rc-shard-2bv","action":"roleProbe","periodSeconds":1}}
2025-11-04T06:33:56Z INFO send probe event {"probe": "roleProbe", "probe": "roleProbe", "code": 0, "output": "primary", "message": ""}
➜ ~
➜ ~ kubectl logs rc-shard-2bv-1 kbagent
2025-11-04T06:35:22Z INFO create service Action {"actions": "roleProbe,postProvision,preTerminate,switchover,memberLeave"}
2025-11-04T06:35:22Z INFO create service Probe {"probes": "roleProbe"}
2025-11-04T06:35:22Z INFO create service Streaming {"actions": ""}
2025-11-04T06:35:22Z INFO service Action started...
2025-11-04T06:35:22Z INFO service Probe started...
2025-11-04T06:35:22Z INFO service Streaming started...
2025-11-04T06:35:22Z INFO starting the HTTP server
2025-11-04T06:35:22Z INFO register service to server {"service": "Action", "method": "POST", "uri": "/v1.0/action"}
2025-11-04T06:35:22Z INFO register service to server {"service": "Probe", "method": "POST", "uri": "/v1.0/probe"}
2025-11-04T06:35:22Z INFO register service to server {"service": "Streaming", "method": "POST", "uri": "/v1.0/streaming"}
2025-11-04T06:35:22Z INFO starting the streaming server
2025-11-04T06:35:22Z INFO probe started {"probe": "roleProbe", "config": {"instance":"rc-shard-2bv","action":"roleProbe","periodSeconds":1}}
2025-11-04T06:35:22Z INFO send probe event {"probe": "roleProbe", "probe": "roleProbe", "code": 0, "output": "primary", "message": ""}
2025-11-04T06:36:11Z INFO Action Executed {"action": "postProvision", "result": "exit code: 1: failed"}
2025-11-04T06:36:11Z INFO HTTP API Called {"user-agent": "Go-http-client/1.1", "method": "POST", "path": "/v1.0/action", "status code": 200, "cost": 6004}
logs kb
2025-11-04T06:36:13.311Z ERROR Reconciler error {"controller": "component", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Component", "Component": {"name":"rc-shard-pxz","namespace":"default"}, "namespace": "default", "name": "rc-shard-pxz", "reconcileID": "38fb043a-fa1a-439f-900c-084363b38394", "error": "action: postProvision, error: exit code: 1: failed: action failed", "errorVerbose": "action failed\naction: postProvision, error: exit code: 1: failed\ngithub.com/apecloud/kubeblocks/pkg/controller/lifecycle.(*kbagent).formatError.func1\n\t/src/pkg/controller/lifecycle/kbagent.go:354\ngithub.com/apecloud/kubeblocks/pkg/controller/lifecycle.(*kbagent).formatError\n\t/src/pkg/controller/lifecycle/kbagent.go:375\ngithub.com/apecloud/kubeblocks/pkg/controller/lifecycle.(*kbagent).callActionWithSelector\n\t/src/pkg/controller/lifecycle/kbagent.go:325\ngithub.com/apecloud/kubeblocks/pkg/controller/lifecycle.(*kbagent).callAction\n\t/src/pkg/controller/lifecycle/kbagent.go:225\ngithub.com/apecloud/kubeblocks/pkg/controller/lifecycle.(*kbagent).checkedCallAction\n\t/src/pkg/controller/lifecycle/kbagent.go:152\ngithub.com/apecloud/kubeblocks/pkg/controller/lifecycle.(*kbagent).PostProvision\n\t/src/pkg/controller/lifecycle/kbagent.go:66\ngithub.com/apecloud/kubeblocks/controllers/apps/component.(*componentPostProvisionTransformer).postProvision\n\t/src/controllers/apps/component/transformer_component_post_provision.go:90\ngithub.com/apecloud/kubeblocks/controllers/apps/component.(*componentPostProvisionTransformer).Transform\n\t/src/controllers/apps/component/transformer_component_post_provision.go:56\ngithub.com/apecloud/kubeblocks/pkg/controller/graph.TransformerChain.ApplyTo\n\t/src/pkg/controller/graph/transformer.go:57\ngithub.com/apecloud/kubeblocks/controllers/apps/component.(*componentPlanBuilder).Build\n\t/src/controllers/apps/component/component_plan_builder.go:110\ngithub.com/apecloud/kubeblocks/controllers/apps/component.(*ComponentReconciler).Reconcile\n\t/src/controllers/apps/component/component_controller.go:177\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700"}
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.
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working