Skip to content

feat(core): report why a resource is terminating#2597

Open
eofff wants to merge 8 commits into
mainfrom
feat/bd/show-why-terminating
Open

feat(core): report why a resource is terminating#2597
eofff wants to merge 8 commits into
mainfrom
feat/bd/show-why-terminating

Conversation

@eofff

@eofff eofff commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a Deleting condition to VirtualDisk, VirtualImage, ClusterVirtualImage and VirtualMachineBlockDeviceAttachment explaining why a resource is stuck in Terminating:

  • DeletionBlockedByProtection — still attached to VirtualMachine(s) (listed in the message);
  • CleanupPending — waiting for owned subresources (PVC, DataVolume, Pods, Service, Ingress, NetworkPolicy) to be removed.

CleanUp now returns a human-readable reason alongside requeue; shared condition/message/cleanup helpers live in service and common/vm to avoid duplication across the four controllers.

Why do we need it, and what problem does it solve?

A resource stuck in Terminating gave no hint about what blocked deletion — the user had to inspect finalizers and subresources by hand. The cause is now visible directly in status.conditions.

What is the expected result?

While terminating, the Deleting condition names the blocker: an attached VM (protection) or the subresource being cleaned up (cleanup pending), then the object is removed once cleanup finishes.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: core
type: feature
summary: Report why a VirtualDisk, VirtualImage, ClusterVirtualImage or VirtualMachineBlockDeviceAttachment is terminating via a Deleting condition.

@eofff eofff force-pushed the feat/bd/show-why-terminating branch from ddc2b54 to 27b1c9d Compare July 7, 2026 08:28
@eofff eofff changed the title Feat/bd/show why terminating feat(vd, vi, cvi, vmbda): report why a resource is terminating Jul 8, 2026
@eofff eofff added this to the v1.10.0 milestone Jul 8, 2026
@eofff eofff changed the title feat(vd, vi, cvi, vmbda): report why a resource is terminating feat(core): report why a resource is terminating Jul 8, 2026
Valeriy Khorunzhin added 8 commits July 8, 2026 10:44
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
@eofff eofff force-pushed the feat/bd/show-why-terminating branch from 415707d to b9d72ab Compare July 8, 2026 07:44
@eofff eofff requested a review from hardcoretime July 8, 2026 08:49
@eofff eofff marked this pull request as ready for review July 8, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant