Skip to content

KVMotion: conductor eph support#647

Draft
anokfireball wants to merge 2 commits into
stable/2023.2-m3from
kvmotion-conductor-eph-support
Draft

KVMotion: conductor eph support#647
anokfireball wants to merge 2 commits into
stable/2023.2-m3from
kvmotion-conductor-eph-support

Conversation

@anokfireball

Copy link
Copy Markdown
Member

No description provided.

Problem

Cross-HV resize previously required the instance to be BFV, enforced
by a global precondition in raise_on_unsupported_cross_hypervisor_resize.
Image-backed instances with an ephemeral root disk were always rejected
before scheduling.

Solution

Remove the BFV-only precondition from the utility function. Add
conductor-local guards that enforce the allowed root BDM shapes after
scheduling so the removal does not open the path to unsupported cases:

- image/local (ephemeral) passes through to the conversion path
- */volume (already BFV) passes through to the existing BFV-only path
- any other root shape (e.g. blank/local, missing root BDM) is rejected

A cross-cell scheduler selection is also rejected for cross-HV resize:
the source-side preparation RPCs are cell-local, so cross-cell placement
is not viable.

Change-Id: Ib66d7de2da1865437b0db9a2127cfd928c3ab073
Problem

KVM hosts cannot boot from a Nova-managed VMDK on a VMware ephemeral
datastore. Before the existing BFV-only cross-HV resize path can handle
an image-backed instance, the root disk must be moved to Cinder.

Solution

After scheduling selects a KVM destination, MigrationTask._execute()
checks whether the root BDM is image/local and if so runs a conversion
pre-step before prep_resize is dispatched.

The pre-step calls prep_cross_hv_conversion on the source compute to
power off the guest and detach the root VMDK, then calls
volume_api.manage_existing to import the VMDK as a Cinder FCD volume.
The manage ref includes source-name (datastore path), size_gb (rounded
up from size_bytes), and an optional source-id when the VMDK already has
an FCD id. Once the volume is available, a reserved attachment is
created, the root BDM is mutated to destination_type=volume, and
system_metadata is updated to record the conversion. The instance then
proceeds through the existing BFV-only path unchanged.

The conversion is permanent. Revert undoes the resize but the instance
comes back as BFV-on-VMware rather than returning to ephemeral.

Point-of-no-return: once Cinder's manage_existing initiates relocation
of the VMDK from VMFS to the FCD NFS pool, the source disk is gone.
Abort (re-attach + power on) is only called when the observed terminal
volume state is 'error', which confirms relocation did not occur.
A generic exception from manage_existing or a volume in 'error_managing'
does not trigger abort, as either could mean relocation has already
started.

Change-Id: I7e991b5da895b059a5b9f459c44ad3e4d5f93c3d
@anokfireball
anokfireball force-pushed the kvmotion-conductor-eph-support branch from 406dd37 to 8625940 Compare July 21, 2026 08:42
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