Bug 1956467 - [MTV] - A new migration plan with different VMs doesn't start due to source VM deletion of a previous successful existing plan
Summary: [MTV] - A new migration plan with different VMs doesn't start due to source V...
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: General
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 2.0.0
Assignee: Sam Lucidi
QA Contact: David Vaanunu
Avital Pinnick
Depends On:
TreeView+ depends on / blocked
Reported: 2021-05-03 18:25 UTC by David Vaanunu
Modified: 2021-05-13 08:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)

Description David Vaanunu 2021-05-03 18:25:11 UTC
Description of problem:

When have migration plans that already finished successfully and the migrated VM was deleted in the source system, the new plan failed to run.

The plan status is: "Running - preparing for migration"
and in the progress status is "Not Started".

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. Create a migration plan, run it (should finish successfully)  
2. Delete the migrated VM from the source system, but not delete his migration plan 
3. Create another migration plan and try to run it

Actual results:

a migration plan isn't running

Expected results:
a migration plan should be running

Additional info:

Comment 1 Fabien Dupont 2021-05-03 18:29:41 UTC
What are the VMs in the second plan? The same as the first plan?
I fail to understand what you are trying to do here.

Comment 2 David Vaanunu 2021-05-03 18:58:52 UTC
The second plan use diff VMs

Comment 3 Ilanit Stein 2021-05-04 09:29:39 UTC
I got a similar behavior when I created a plan from CLI, and run it from CLI, and then I deleted the plan from UI.
The migration CR was not deleted. and when I tried to run the plan again, it didn't start as described here in the bug.
Maybe in your flow the previous migration CR was not deleted?

There is a bug that when a plan CR is deleted in CLI the migration CR should be deleted too. 
But I think that even if we run a plan, though it's previous CR still exist, it should not cause the plan to be at a "non starting" state, but rather fail.


Comment 4 Fabien Dupont 2021-05-04 12:21:23 UTC
Would it be possible to have access to an environment where it's happening? I still don't understand the exact flow.
@slucidi@redhat.com, could you please help troubleshooting this?

Comment 5 Sam Lucidi 2021-05-04 16:41:12 UTC
The issue here is a specific edge case in the scheduler when it encounters a completed Plan, but one or more of the source VMs on that Plan have been removed from the inventory. VMs on completed Plans can't affect the schedule because they're not running, but they shouldn't be considered by the scheduler at all. The scheduler needs to A) disregard completed Plans, and B) not fail if a VM can't be found in the inventory. This is unrelated to any issues regarding Migration CRs being left behind after a plan is deleted.

Comment 7 Fabien Dupont 2021-05-06 21:37:47 UTC
The fix is in build 2.0.0-10 / iib:73160.

Comment 8 David Vaanunu 2021-05-11 11:51:46 UTC
The second plan use diff VMs

Comment 9 David Vaanunu 2021-05-13 08:43:19 UTC
Verified on MTV_2.0.0-12 / iib:73572

Note You need to log in before you can comment on or make changes to this bug.