feat(mtv-warm-cutover): add warm migration cutover#19
Conversation
Add a new role and playbook to trigger cutover on active warm migrations. Patches the Migration resource with a cutover timestamp to initiate the final CBT sync, source VM shutdown, and target VM boot. Supports targeting by migration name, label selector, or plan name, with optional wait-for-completion verification. Resolves: MFG-216 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
spyrexd
left a comment
There was a problem hiding this comment.
My review is only on the code. I have not tested functionality.
- Update min_ansible_version to 2.16.0 - Skip migrations that already have a cutover timestamp instead of failing - Add argument_specs.yml declaring all role inputs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sabre1041
left a comment
There was a problem hiding this comment.
Added a few comments after review
| @@ -0,0 +1,77 @@ | |||
| --- | |||
|
|
|||
| - name: _apply_cutover | Check if Cutover Already Defined | |||
There was a problem hiding this comment.
There may be a situation where the user might want to adjust the cutover time. Lets just say that they set it for time A in the future and want to bring forward the time to an earlier time to start the migration early.
Maybe we keep the existing logic on by default but allow an overview (globally + at a migration level?)
| - name: _apply_cutover | Wait for Migration to Complete | ||
| when: | ||
| - not (mtv_warm_cutover_already_set | bool) | ||
| - mtv_warm_cutover_verify_complete | bool |
There was a problem hiding this comment.
Currently a global variable. Within the mtv_migrate role, the decision to wait at different phases is on each plan. Move to support at the Migration level?
- Fail on existing cutover instead of silently skipping; add force_cutover option (global + per-migration) to allow override with op:replace patch - Move verify_complete to per-migration level (mirrors mtv_migrate pattern), falling back to global default - Add force_cutover and verify_complete to argument_specs and defaults with full descriptions - Remove already_set guard from wait/verify tasks so forced cutovers also get verified
Run docsible to sync generated documentation with current argument_specs and role metadata after adding force_cutover and per-migration verify_complete options.
Merge main into feat/warm-migration-cutover, resolving conflicts in 11 role READMEs by accepting main's docsible templates and regenerating documentation via docsible + md_toc.
Add top-level heading before docsible-generated content to satisfy MD041/first-line-heading rule.
Match CI docsible output which does not insert a blank line between the H1 heading and the DOCSIBLE START comment.
sabre1041
left a comment
There was a problem hiding this comment.
Functionality looks good. Just need to resolve the failing test
Summary
mtv_warm_cutoverrole and playbook to finish warm migrations by triggering the cutover phasespec.cutoverwith a timestamp to initiate the final CBT sync, source VM shutdown, and target VM bootResolves
MFG-216 — Finish warm migration step
Usage
Test plan
yamllintpasses (confirmed)ansible-lint --offlinepasses production profile (confirmed — 0 failures)🤖 Generated with Claude Code