Skip to content

feat(vmbda): forbid hotplug of RWO disks during migration#2569

Draft
loktev-d wants to merge 3 commits into
mainfrom
feat/vm/forbid-rwo-hotplug-during-migration
Draft

feat(vmbda): forbid hotplug of RWO disks during migration#2569
loktev-d wants to merge 3 commits into
mainfrom
feat/vm/forbid-rwo-hotplug-during-migration

Conversation

@loktev-d

@loktev-d loktev-d commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Forbids hot-plugging a ReadWriteOnce disk into a virtual machine while it is migrating.

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

A ReadWriteOnce volume can only be attached on a single node. Hotplugging one during a live migration pins its PVC to a node and breaks scheduling of the migration target. This change prevents that class of failure by refusing to start an RWO hotplug while the VM is migrating; the attachment simply waits and proceeds automatically once migration completes.

What is the expected result?

With a VM running and an RWO VirtualDisk available (not attached):

  1. Start a live migration of the VM.
  2. While it is migrating, create a VirtualMachineBlockDeviceAttachment for the RWO disk.
  3. The VMBDA stays in Pending with Attached=False / reason BlockedByMigration ("Cannot hotplug a ReadWriteOnce disk while the virtual machine is migrating.")
  4. When the migration completes, the VMBDA is re-reconciled and transitions to Attached.

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: vmbda
type: feature
summary: forbid hotplug of RWO disks during migration

Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d marked this pull request as draft July 1, 2026 16:00
loktev-d added 2 commits July 2, 2026 11:01
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
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 Jul 2, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jul 2, 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 Jul 2, 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