Bug 1654865 - [v2v] Edit Migration plan shows VM status incorrect
Summary: [v2v] Edit Migration plan shows VM status incorrect
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.11.0
Assignee: Brett Thurber
QA Contact: Yadnyawalk Tale
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
Depends On:
Blocks: 1696419
TreeView+ depends on / blocked
 
Reported: 2018-11-29 21:12 UTC by Kedar Kulkarni
Modified: 2019-12-13 15:16 UTC (History)
9 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1696419 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:16:18 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:
kkulkarn: automate_bug-


Attachments (Terms of Use)
ScreenVideoRecording (3.48 MB, video/mp4)
2018-11-29 21:12 UTC, Kedar Kulkarni
no flags Details

Description Kedar Kulkarni 2018-11-29 21:12:07 UTC
Created attachment 1509975 [details]
ScreenVideoRecording

Description of problem:
If I create a new migration plan, using CSV import and select some VMs that have status "VM is already Migrated". Then I save that plan. Go to Edit plan and let it discover VMs instead of providing CSV. If I look at status of all selected VMs I will be able to see some of the VMs marked as "Available for Migration" even though previously those were showing "Already Migrated".

See recording attached here for more clarification.

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

How reproducible:
100%

Steps to Reproduce:
1.See recording attached
2.
3.

Actual results:
See recording attached

Expected results:
VM status should be displayed correctly in "Edit Migration Plan" wizard

Additional info:

Comment 3 Mike Turley 2018-12-11 21:25:34 UTC
The reason this is happening is because of how we handle populating the list of VMs when editing a migration plan. The VM discovery service does not return VMs which are already part of a plan, because they must be excluded when creating new plans. As a result, when editing a plan and using VM discovery mode, in order to include the VMs that should be pre-selected in that list, we must merge together the discovery results with a list of the VMs already in the plan.

In doing this merge, we have no status information about the VMs being merged in (because that VM data is not coming from the discovery service), so we display "available for migration", which is technically correct but just inconsistent with what you get when you import a CSV containing those VMs and you see the "already migrated" status. It's only possible to see this corner case by creating a plan which includes VMs which have already been migrated (only possible via a CSV) and then editing that plan and choosing discovery mode.

After a discussion with Vince and Mike Ro, we determined that we have a 3 options for how to address this:

1. Do nothing because technically nothing is broken (the VMs are available for migration even though they are already migrated, we just display the best info we have available)

2. Remove the "VM has already been migrated" warning that appears during CSV import, to avoid this inconsistency

3. Figure out a way to query the discovery service twice in this scenario, once to discover new VMs and once with a CSV of the VMs already existing in the plan, and then merge those results so we have correct status information when merging. This seems tricky and excessive for such a small corner case.

Adding Brett and Marco to see what they think we should do here.

Comment 4 Brett Thurber 2018-12-12 04:19:00 UTC
I believe this is an edge use case.  We maintain the .csv import as the only way to migrate previously migrated VM's.  We shouldn't allow those same VM's to be selectable though the VM selection UI if they have been previously migrated.

Comment 6 Mike Turley 2018-12-13 14:27:30 UTC
So @Brett if I understand you correctly we should still be able to allow these previously migrated VMs to be selectable via .csv import? The problem here is what happens after you do that, when you try to edit that plan. If you select the "discover VMs" mode when editing, we need to include and pre-select VMs that are already in the plan, at which time we don't know whether they have already been migrated.

We already don't allow those previously migrated VMs to be selected in discovery mode in a new plan, but in the editing case, it's a little more tricky.

Comment 10 Mike Turley 2018-12-13 19:24:29 UTC
Opened a GitHub Issue to track this: https://github.com/ManageIQ/manageiq-v2v/issues/835

Comment 11 Mike Turley 2018-12-19 23:21:13 UTC
This bug will be fixed by this PR: https://github.com/ManageIQ/manageiq-v2v/pull/841

Comment 12 Mike Turley 2019-04-01 17:22:28 UTC
Fabien, can we approve this one for release in 5.10.3? It's required for https://bugzilla.redhat.com/show_bug.cgi?id=1666352

Comment 14 Yadnyawalk Tale 2019-05-21 09:49:35 UTC
Verified on: 5.11.0.4


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