Skip to content

fix(vd): skip terminating PVC when selecting volume migration target#2494

Open
loktev-d wants to merge 1 commit into
mainfrom
fix/disks/migration-skip-terminating-pvc
Open

fix(vd): skip terminating PVC when selecting volume migration target#2494
loktev-d wants to merge 1 commit into
mainfrom
fix/disks/migration-skip-terminating-pvc

Conversation

@loktev-d

@loktev-d loktev-d commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

In createTargetPersistentVolumeClaim, filter out terminating PVCs before selecting/counting the VD's PVCs, so a still-finalizing source PVC from a previous migration is no longer adopted as the new migration target.

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

When a migration completes, the controller deletes the source PVC but doesn't wait for it to finalize. If the next migration starts within those few seconds, the handler saw 2 PVCs (current + still-terminating old source) and adopted the terminating one as the target. That PVC then disappeared, leaving the VD stuck on "Target persistent volume claim is not found". Surfaced by the e2e StorageClassMigration test.

What is the expected result?

StorageClassMigration e2e test should not fail.

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: vd
type: fix
summary: skip terminating PVC when selecting volume migration target

Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jun 16, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jun 16, 2026
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jun 16, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jun 16, 2026
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jun 17, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jun 17, 2026
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.

2 participants