Skip to content

feat(mtv-migrate): add warm migration plan support#18

Open
stevefulme1 wants to merge 2 commits into
redhat-cop:mainfrom
stevefulme1:feat/warm-migration-plan
Open

feat(mtv-migrate): add warm migration plan support#18
stevefulme1 wants to merge 2 commits into
redhat-cop:mainfrom
stevefulme1:feat/warm-migration-plan

Conversation

@stevefulme1
Copy link
Copy Markdown
Contributor

@stevefulme1 stevefulme1 commented Apr 6, 2026

Summary

  • Adds warm migration support to the mtv_migrate role using MTV/Forklift's Changed Block Tracking (CBT)
  • Exposes warm and cutover as first-class parameters in mtv_migrate_migration_request
  • Sets spec.warm on the Forklift Plan to enable incremental disk copying while VMs run
  • Optionally sets spec.cutover on the Migration to schedule the final sync (ISO 8601 timestamp)
  • Defaults to false (cold migration) — fully backwards compatible

Resolves

MFG-214 — Create warm migration plan

Usage

mtv_migrate_migration_request:
  warm: true                          # Enable warm migration
  cutover: "2026-04-07T02:00:00Z"     # Optional: schedule cutover
  start_migration: true
  verify_migrations_complete: true
  vms:
    - name: my-vm
      path: datacenter/vm/folder/my-vm

Files Changed

  • roles/mtv_migrate/defaults/main.yml — added warm default + docs
  • roles/mtv_migrate/tasks/main.yml — process warm and cutover params
  • roles/mtv_migrate/templates/plan_skeleton.yml.j2 — added spec.warm
  • roles/mtv_migrate/templates/migration.yml.j2 — conditional spec.cutover

Test plan

  • Verify yamllint passes (confirmed — warnings only, pre-existing)
  • Verify ansible-lint --offline passes production profile (confirmed — 0 failures)
  • Cold migration still works (warm defaults to false)
  • Integration: create warm plan and verify spec.warm: true in Plan CR
  • Integration: verify cutover timestamp in Migration CR when provided
  • Integration: verify no cutover field when cutover not specified
  • Requires VMware CBT-capable environment for full warm migration test

🤖 Generated with Claude Code

Add warm migration capability to the mtv_migrate role using MTV's
Changed Block Tracking (CBT) support. Adds spec.warm field to the
Plan skeleton, cutover scheduling to the Migration template, and
exposes warm/cutover as first-class parameters in migration_request.

Resolves: MFG-214

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
spyrexd
spyrexd previously approved these changes Apr 17, 2026
Copy link
Copy Markdown

@spyrexd spyrexd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@albertoflorez albertoflorez self-requested a review May 26, 2026 09:04
Copy link
Copy Markdown

@albertoflorez albertoflorez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on adding the Warm Migration and Cutover support!

However, I noticed that the meta/argument_specs.yml file hasn't been updated to include these new keys. Without this update, any execution using the mtv_migrate role will fail during the Validating arguments against arg spec task if these parameters are provided in the mtv_migrate_migration_request dictionary.

To fix this, we should add warm and cutover to the options section of the mtv_migrate_migration_request argument spec:

# roles/mtv_migrate/meta/argument_specs.yml

# ... under mtv_migrate_migration_request -> options:
          warm:
            type: "bool"
            default: false
            description: Whether to perform a warm migration (pre-copy).
          cutover:
            type: "str"
            description: ISO8601 timestamp for the migration cutover (e.g., 2026-06-20T15:00:00Z).

This ensures the role remains compatible with strict validation environments like AAP and provides better documentation for the role's interface.

@stevefulme1
Copy link
Copy Markdown
Contributor Author

Thanks @albertoflorez — great catch! I completely missed the argument_specs.yml update, which would have broken validation in AAP.

Added warm (bool, default false) and cutover (str) to the mtv_migrate_migration_request options in 1fa6ba1. Should be good now.

@stevefulme1 stevefulme1 deployed to external-ci May 27, 2026 13:40 — with GitHub Actions Active
Copy link
Copy Markdown

@albertoflorez albertoflorez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!! LGTM!

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.

3 participants