[BUG] 0-Replica component start gets stuck in Starting phase
Describe the bug
When stopping a component that originally had 0 replicas (e.g., dmmonitor in standalone mode), it enters an unrecoverable status. If it is subsequently started:
- The snapshot annotation apps.kubeblocks.io/stop-replicas-snapshot is never removed from etcd.
- Desired replica modifications (e.g., scaling from 0 to 1) are discarded.
- The component remains permanently stuck in the Starting phase, and the parent Cluster remains permanently stuck in Updating.
To Reproduce Steps to reproduce the behavior:
- Deploy a cluster that contain 0-replica component
- Stop the cluster
- Start the cluster
Expected behavior The 0-replica component can clear its stop-snapshot and can be furtuer used.
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.
- on 1.0.x , we failed to start a stoped zero-replica compont
- on 1.1.x, we can start a stopped zero-replica compont, but failed to scale it from 0 -> 1.
We added focused regression tests on release-1.1 (HEAD 96b1ddf61) but could not reproduce the reported 0 -> 1 scaling failure in the core controllers. The following paths all passed:
- Start a stopped zero-replica Cluster component, then scale it from 0 to 1.
- Start and scale the Cluster component from 0 to 1 in the same update.
- The corresponding Component -> InstanceSet propagation paths.
- Stop/start readiness and observed-generation convergence for a zero-replica InstanceSet.
- HorizontalScaling OpsRequest from 0 to 1.
The relevant controller code is also unchanged between v1.1.0-beta.10 and the tested release-1.1 HEAD. We do not have the damengdb addon, so we could not reproduce the exact addon scenario.
Could you please provide the following information from the failing environment?
- Exact KubeBlocks version and controller image tag/digest.
- Exact damengdb addon version.
- The commands or OpsRequest YAML used to start and scale the component.
- Cluster, Component, and InstanceSet YAML after the start operation and again after the 0 -> 1 scale operation (including metadata generation, spec, status, and conditions).
- KubeBlocks controller logs covering both operations.
Please redact any credentials or other sensitive values.
i used etcd cmpd as an example here in v 1.1. to reproduce
- update etcd cmpd , set
replica limitsto alow min 0 replcias - create a etcd cluster with 0 replicas
- stop it --> stopped
- start it --> running
- scale it from 0 to 1 replicas --> running
but not pod is created, kubeblocks logs error
2026-08-28T10:23:09.612Z INFO build error: no available pod to dump data {"controller": "component", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Component", "Component": {"name":"etcd-cluster-etcd","namespace":"demo"}, "namespace": "demo", "name": "etcd-cluster-etcd", "reconcileID": "04b84a19-abe5-4176-98b0-f0ba025f7194", "component": {"name":"etcd-cluster-etcd","namespace":"demo"}}
2026-08-28T10:23:09.616Z INFO reconcile object *v1.Component with action STATUS OK {"controller": "component", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Component", "Component": {"name":"etcd-cluster-etcd","namespace":"demo"}, "namespace": "demo", "name": "etcd-cluster-etcd", "reconcileID": "04b84a19-abe5-4176-98b0-f0ba025f7194", "component": {"name":"etcd-cluster-etcd","namespace":"demo"}}
2026-08-28T10:23:09.617Z INFO no available pod to dump data {"controller": "component", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Component", "Component": {"name":"etcd-cluster-etcd","namespace":"demo"}, "namespace": "demo", "name": "etcd-cluster-etcd", "reconcileID": "04b84a19-abe5-4176-98b0-f0ba025f7194", "component": {"name":"etcd-cluster-etcd","namespace":"demo"}}
2026-08-28T10:23:09.617Z ERROR Reconciler error {"controller": "component", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "Component", "Component": {"name":"etcd-cluster-etcd","namespace":"demo"}, "namespace": "demo", "name": "etcd-cluster-etcd", "reconcileID": "04b84a19-abe5-4176-98b0-f0ba025f7194", "error": "no available pod to dump data"}
It is confusing that cluster and compont are RUNNIING WITHOUT any replicas while expecting ONE.
As the kubeblocks log indicated, ETCD failed to dump data (dump from existing replicas which is none)
That's to say the combination of zero-replica and 'dump data' lifecycle action is invalid .
Related test-coverage PR: #10824.
This PR only repairs the existing stopped-component scale tests and adds focused coverage for the zero-replica/data-action paths. It does not change controller or status behavior and is not intended to close this issue.
just tested, it works on v1.0.3-beta.12
This issue has been marked as stale because it has been open for 30 days with no activity