kubeblocks icon indicating copy to clipboard operation
kubeblocks copied to clipboard

[Bug] release-1.1 Instance API does not execute Stop

Open leon-ape opened this issue 1 month ago • 1 comments

When enableInstanceAPI=true on release-1.1, a Component Stop request reaches InstanceSet but is not propagated to its Instances. Their Pods remain running, so the component cannot finish stopping.

Reproduction

  1. Run a component with the Instance API enabled and at least one Pod.
  2. Request Stop through StopOps or the Component Stop field.
  3. InstanceSet has spec.stop=true, but its Instances continue maintaining their Pods.

A controller-entry reproduction on release commit 7b30326bd persists Stop and runs eight parent/Instance reconciliation rounds. One Pod remains Running. The release Instance API has no Stop field and ITS2 has no Stop execution branch.

Expected behavior

Stop releases Pods while preserving Instances and existing PVCs. Resume uses the latest desired payload. Ordered/parallel admission and partial-commit retries converge through public Instance runtime status, including Pod absence while PVC cleanup continues.

Track the release-1.1 backport of #10959 in #10981. Preserve 1.1's config Generation, API-version routing, Restore behavior and existing retention policies. Original InstanceSet Stop fixes and retention synchronization are already present through #10965 and #10978.

leon-ape avatar Oct 14 '26 11:10 leon-ape

Resolved by #10981, merged into release-1.1 as 5d39dd2289bf0e613fc505f4dc1cd064a3fa3024.

Verified that the fix is present in the current release-1.1 head, 2d536dabcb8931fe984a7881224629b28ae0127c. The current InstanceSet2 path propagates Stop to Instances, and the Instance controller removes the Pod while retaining the Instance and its existing PVCs. Resume waits for the stopped runtime observation and delivers the current payload.

Re-ran the existing controller-entry regressions on that release head:

codex-go-test.sh ./controllers/workloads -run '^TestInstance(Set)?Stop' -count=1 -v
PASS

Coverage includes Stop and resume, current image and storage targets, PVC preservation, OrderedReady and Parallel admission, delayed Pod observations, and recovery from child handoff or parent status write failures. These tests use fake clients and actual controller entry paths.

The reported missing Stop implementation on release-1.1 is resolved. Closing as completed.

leon-ape avatar Nov 13 '26 02:11 leon-ape