Repository navigation
B #8179: Run VMM cleanup when deleting VMs in EPILOG* states - #8180
Open
trukhinyuri wants to merge 1 commit into
Open
trukhinyuri wants to merge 1 commit into
trukhinyuri wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change correctly uses the existing ordered VMM cleanup workflow and addresses the orphaned-domain failure mode.
0 open findings
What changed in this PR
Routes EPILOG-state cleanup through VMM cleanup to terminate hypervisor domains before deleting storage.
Changes:
- Replaces direct TM epilog deletion with coordinated VMM cleanup.
| File | Description |
|---|---|
src/lcm/LifeCycleActions.cc |
Triggers VMM cleanup for EPILOG states. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
LifeCycleManager::clean_up_vm() only issued the TM delete for VMs in EPILOG, EPILOG_STOP, EPILOG_UNDEPLOY and their *_FAILURE variants. If the domain is still present on the host (for example after "onevm recover --success" on a VM stuck in SHUTDOWN or SAVE_STOP), it is never cancelled and keeps running after the VM reaches DONE. Use vmm->trigger_cleanup() as the other running states do. The driver CLEANUP action cancels the domain (no_fail), runs vnm clean and then the same TM delete commands built by epilog_delete_commands(). Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
trukhinyuri
force-pushed
the
fix/lcm-cleanup-epilog-vmm
branch
from
October 14, 2026 11:54
0747fc7 to
2dfe76e
Compare
paczerny
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #8179.
LifeCycleManager::clean_up_vm()handlesEPILOG,EPILOG_STOP,EPILOG_UNDEPLOYand their*_FAILUREvariants with a plaintm->trigger_epilog_delete(vm). Every other state where a domain may exist on the host goes throughvmm->trigger_cleanup().Normally the domain is already gone when the VM reaches
EPILOG*, but that is not guaranteed. For example,onevm recover --successon a VM stuck inSHUTDOWNorSAVE_STOPmoves it toEPILOG*while the domain may still be running. If the TM delete then fails and the VM is removed withonevm terminate --hardoronevm recover --delete, nothing cancels the domain and it keeps running (and using its IP/MAC) after the VM isDONE.This change uses
vmm->trigger_cleanup(vid, false)for those states. The driverCLEANUPaction (one_vmm_exec.rb) runsvmm/cancelwithno_fail, thenvnm/clean, then the same TM delete commands produced byTransferManager::epilog_delete_commands()thattrigger_epilog_delete()uses today. When the domain is already gone, the extra steps are no-ops.Branches to which this PR applies