Skip to content

fix(vm): keep target PVC when migrating VM with local disks (release 1.9)#2522

Merged
loktev-d merged 1 commit into
release-1.9from
fix/vm/local-disk-migration-volume-revert-1.9
Jun 23, 2026
Merged

fix(vm): keep target PVC when migrating VM with local disks (release 1.9)#2522
loktev-d merged 1 commit into
release-1.9from
fix/vm/local-disk-migration-volume-revert-1.9

Conversation

@loktev-d

Copy link
Copy Markdown
Contributor

Description

Two fixes making live migration / Evict of VMs with hotplugged local-storage disks reliable. Follow-up to #2508.

  1. vm controller: stable volume swap. The migration volume/affinity were gated on the VD Migrating condition, which is False (WaitForTargetReady) until the target PVC binds. Mid-migration the controller read that as "not migrating" and reverted the hotplug volume/affinity to the source PVC. Now gated on the stable MigrationState.
  2. vd controller: no stale target PVC. Back-to-back migrations could adopt a previous migration's still-terminating PVC as the target. Now terminating non-source PVCs are filtered out, so a fresh target is created.

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

VMs with local-storage hotplug disks couldn't be reliably evicted/migrated.

What is the expected result?

Repeatedly Evict a VM with a hotplug disk on a local WFC storage class - target launcher and attachment pod schedule on the target node and the migration completes; no Unschedulable, no WaitForTargetReady stall.

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: vm
type: fix
summary: keep target PVC when migrating VM with local disks

@loktev-d loktev-d changed the base branch from main to release-1.9 June 23, 2026 08:17
Two fixes making live migration / Evict of VMs with hotplugged local-storage disks reliable. Follow-up to #2508.

1. vm controller: stable volume swap. The migration volume/affinity were gated on the VD Migrating condition, which is False (WaitForTargetReady) until the target PVC binds. Mid-migration the controller read that as "not migrating" and reverted the hotplug volume/affinity to the source PVC. Now gated on the stable MigrationState.
2. vd controller: no stale target PVC. Back-to-back migrations could adopt a previous migration's still-terminating PVC as the target. Now terminating non-source PVCs are filtered out, so a fresh target is created.

---------

Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d force-pushed the fix/vm/local-disk-migration-volume-revert-1.9 branch from 566987a to e6dece1 Compare June 23, 2026 08:18
@loktev-d loktev-d added this to the v1.9.1 milestone Jun 23, 2026
@loktev-d loktev-d merged commit edcf5b8 into release-1.9 Jun 23, 2026
28 of 31 checks passed
@loktev-d loktev-d deleted the fix/vm/local-disk-migration-volume-revert-1.9 branch June 23, 2026 08:55
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