Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1959377

Summary: Migration plan retains deleted source VM and displays "Unknown power state" status on "Migration details by VM" page
Product: Migration Toolkit for Virtualization Reporter: David Vaanunu <dvaanunu>
Component: User ExperienceAssignee: Mike Turley <mturley>
Status: CLOSED ERRATA QA Contact: David Vaanunu <dvaanunu>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: high    
Version: 2.0.0CC: apinnick, fdupont, istein, jortel, mturley, pvauter
Target Milestone: ---   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-09 19:20:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Vaanunu 2021-05-11 12:06:09 UTC
Description of problem:

While verifying Bug1956467, after VMs were successfully migrated, delete a few VMs from the source env.
After VM deletion, the VM name was disappeared from the plan.

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

MTV_2.0.0-12
CNV_262

How reproducible:


Steps to Reproduce:
1. Create a plan of a few VMs
2. VMs completed migrating
3. Delete a VM from the source env
4. Open the plan --> The VM name is disappeared

Actual results:
VM name in the plan is empty

Expected results:
VM name should be display


Additional info:

Screenshots: https://drive.google.com/drive/folders/1v9PCedRcv_1sg5JrvTI_gC0v15-AbpVP?usp=sharing

Comment 1 Fabien Dupont 2021-05-11 14:15:30 UTC
@jortel would it be possible to flag the virtual machine in the plan instead of removing it? The plan shouldn't be in Critical condition.

Comment 2 Mike Turley 2021-05-11 16:45:45 UTC
Leaving the VM in the plan wouldn't help, since the plan only contains VM ids. The VM names are looked up in the inventory for display, so if they are deleted from the inventory there's nothing we can do. The only way to solve that would be to actually store the VM names on the plan as well, I think?

Comment 3 Mike Turley 2021-05-11 16:46:32 UTC
Also I believe those VM ids are left in the plan already, it's just a matter of the name lookup

Comment 4 Jeff Ortel 2021-05-13 15:46:55 UTC
There are 2 aspects being discussed:

1. Can/should the VMNotFound condition be Warn instead of Critical and the controller flag/skip the VM during migration?

Yes, we could do that.  Should we?

2. What NAME should/can the UI show for a VM listed on a plan if the VM has been deleted on the source.

The controller has started employing a design pattern to store resolved references in the Status.  Currently, based on need, only the mapping CRs does this but we plan to eventually do the same for the other CR/controllers as well.  One option to solve this problem would be for the Plan controller do this and the UI could look in the Plan status for a VM name when it cannot be found in the inventory. This has the advantage over the UI stashing the name in the spec because:
  1. The Plan status would be updated if the VM is renamed in the source.
  2. The VM ID and name in the spec is redundant and prone to anomalies.  We definitely want to continue using the ID because it's a primary key.

Comment 5 Mike Turley 2021-05-13 15:50:55 UTC
+1 for the controller putting VM names in the plan status. That would be very convenient.

Comment 6 Mike Turley 2021-05-13 15:52:00 UTC
Hmm-- however, if the VMs are deleted from the source provider before the plan is started, I imagine the names wouldn't appear in the status yet? Could we do that at plan creation instead of when the migration starts?

Comment 7 Mike Turley 2021-06-14 19:30:47 UTC
@jortel do you think we can get this into 2.1.0 (putting resolved VM names in the plan status) or should this be retargeted to 2.2.0?

Comment 8 Fabien Dupont 2021-09-01 21:47:19 UTC
Could it be retested with MTV 2.1.0, please?

Comment 10 David Vaanunu 2021-09-02 10:33:01 UTC
re-test on MTV_2.1.0-53
with RHV provider.
issue still occurred - Added screenshot attachment.

Comment 11 Mike Turley 2021-09-02 15:31:09 UTC
It makes sense that this would still be broken, removing the VM from the inventory removes the only place the UI can look up its name from the VM id. @jortel would it make sense to follow up on your idea of adding the VM names to the plan status?

Comment 12 Mike Turley 2021-10-25 19:42:57 UTC
Following up after discussion with Jeff. The UI will first look for VM names in the inventory as it does today, then fall back to looking at the status object.

Comment 14 Fabien Dupont 2021-11-02 06:48:55 UTC
Please verify with mtv-operator-bundle-2.2.0-70 / iib:130812, or later.

Comment 15 David Vaanunu 2021-11-07 11:02:18 UTC
verified with MTV_2.2.0-72 (using cloud38)

Migrate 5 VMs from vmware67.
After migration ended successfully, deleted 2 VMs from vmware67.
Plan have all VMs name

Comment 20 errata-xmlrpc 2021-12-09 19:20:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (MTV 2.2.0 Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:5066

Comment 21 Red Hat Bugzilla 2023-09-15 01:06:23 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days