Bug 2024228 - MTV migration - The importer reason "Pending" is not informative enough
Summary: MTV migration - The importer reason "Pending" is not informative enough
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: General
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.3.0
Assignee: Sam Lucidi
QA Contact: Ilanit Stein
Richard Hoch
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-17 16:16 UTC by Ilanit Stein
Modified: 2022-04-04 18:03 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-04 18:03:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2022:1183 0 None None None 2022-04-04 18:03:53 UTC

Description Ilanit Stein 2021-11-17 16:16:27 UTC
Description of problem:
When Migrating VMs using MTV for these 2 cases, the migration plan reflects the DV status, however it is not informative enough to indicate the reason.

1. A suitable storage cannot be found 
(no NFS PV with a size large enough, for example):
The reason value: 'Pending'  is not clear, and propagating it to the MTV UI will have no meaning to the user.
From the migration CR yaml:

        - annotations:
            unit: MB
          name: 8028ba4a-2d6d-4e05-85c7-782e7cf3d241
          phase: Pending
          progress:
            completed: 0
            total: 102400
          reason: Pending

2. VDDK init image is not configured:
The value mentioned in the reason field: 'AwaitingVDDK', is not clear enough to be just propagated to MTV UI.

From the migration CR yaml:

        - annotations:
            unit: MB
          name: '[v2v_general_porpuse_ISCSI_DC] istein-rhel8/istein-rhel8.vmdk'
          phase: Pending
          progress:
            completed: 0
            total: 16384
          reason: AwaitingVDDK


Could the reason for these 2 cases change please to be more meaningful?

Version-Release number of selected component (if applicable):
CNV-4.9.1, MTV-2.2

Comment 1 Yan Du 2022-01-26 13:27:28 UTC
Shelly, could you please take a look? Is it something we have in 4.10?

Comment 2 skagan 2022-01-27 08:30:56 UTC
I asked for more information from Ilanit, it needs further investigation

Comment 7 Ilanit Stein 2022-01-27 11:21:41 UTC
Checked on OCP-4.9.12/CNV-4.9.2-27/MTV-2.2 GA

1. A suitable storage cannot be found 
DV:
message: PVC rhv-no-storage-961ffd10-1b15-47e2-8fb8-d03b8555aa9d-45w5v Pending
reason: Pending

MTV Migration UI show Disk Transfer in state 'pending'

  vms:
  - id: 961ffd10-1b15-47e2-8fb8-d03b8555aa9d
    name: v2v-rhel8
    phase: CopyDisks
    pipeline:
    - completed: 2022-01-27T10:40:49Z
      description: Initialize migration.
      name: Initialize
      progress:
        completed: 1
        total: 1
      started: 2022-01-27T10:40:00Z
    - annotations:
        unit: MB
      description: Transfer disks.
      name: DiskTransfer
      phase: Pending
      progress:
        completed: 0
        total: 102400
      reason: Pending
      tasks:
      - annotations:
          unit: MB
        name: 8028ba4a-2d6d-4e05-85c7-782e7cf3d241

    
2. VDDK init image is not configured:
DV:
message: waiting for v2v-vmware configmap for VDDK image
reason: AwaitingVDDK

MTV Migration UI show Disk Transfer in state 'pending'

  vms:
  - id: vm-689
    name: mini-rhel7-istein
    phase: CopyDisks
    pipeline:
    - completed: 2022-01-27T10:29:11Z
      description: Initialize migration.
      name: Initialize
      progress:
        completed: 1
        total: 1
      started: 2022-01-27T10:28:32Z
    - annotations:
        unit: MB
      description: Transfer disks.
      name: DiskTransfer
      phase: Pending
      progress:
        completed: 0
        total: 10240
      reason: AwaitingVDDK
      tasks:
      - annotations:
          unit: MB
        name: '[rhv-v2v-performance-testing] mini-rhel7-istein/mini-rhel7-istein_2.vmdk'
        phase: Pending
        progress:
          completed: 0
          total: 10240
        reason: AwaitingVDDK
    - description: Convert image to kubevirt.
      name: ImageConversion
      progress:
        completed: 0
        total: 1
    restorePowerState: "Off"
    started: 2022-01-27T10:28:32Z


Seems there are 2 problems:
1. MTV propagates reason and not message field.
2. The messages are not detailed enough/not accurate:
   A. The message for no storage doesn't detail the problem - in this case no PV in 
      correct size
   B. I think the message for VDDK should change but I am not sure exactly to what. 
      v2v-vmware config map was used in the past. in CNV-4.9 we add it in 
      kubevirt-hyperconverged hco. 
      Not sure for CNV-4.10 what should be the correct message.

Matthew/Sam,
Would you please address these problems?

Comment 8 Matthew Arnold 2022-01-27 16:07:33 UTC
Yes, the VDDK message should change. I don't think upstream CDI can assume the presence of HCO or MTV, so I don't think the message can be detailed enough to be passed straight through to the MTV UI. There is a per-DataVolume initImageURL spec field for VDDK imports now, maybe it would be better to mention that instead of v2v-vmware or kubevirt-hyperconverged.

I'm not so sure what to do about the message for when there's no available PVs though.

Comment 9 Sam Lucidi 2022-01-27 16:30:07 UTC
It looks like there may be a bug in that reasons/phases are not always cleared, so at times the wrong message appears. Also, when there are no available PVs, unfortunately both the phase and reason on the DV are reported by CDI as "Pending". However, it seems that CDI puts more detailed information in a "message" field on the DV condition, and we could have MTV report that in the status alongside the phase and reason. For the AwaitingVDDK case, we can report our own more detailed message in place of the "v2v-vmware configmap" message from CDI.

Comment 10 skagan 2022-01-30 15:36:01 UTC
So I want to understand:
1) for the VDDK there is nothing that can be done in CDI.
2) MTV needs to take the `message` field from the DV alongside the reason.
3)for the size case you do believe it is something that should be changed in CDI?
did I get it right? If so, maybe for (1),(2) a new BZ should be opened?

Comment 11 Ilanit Stein 2022-02-01 16:02:29 UTC
Thank you Matthew, Sam, and Shelly for your replies.

Moving this bug to MTV product to propagate the Data volume 'message' content to Migration/plan CR and migration UI.

Comment 12 Ilanit Stein 2022-03-10 18:50:38 UTC
Tested on MTV-2.3.0-37:

1. A suitable storage cannot be found 
Migration from VMware to NFS of a VM with a disk larger than available PVs  

Result:

In UI:

Transfer disk state field show:
"Pending - Pending; PVC istein1-vm-35010-gwd4k Pending"
See "pending_storage_screenshot" attached

Message in the DV:
message: PVC istein1-vm-35010-gwd4k Pending

plan yaml:
 reason: Pending; PVC istein1-vm-35010-gwd4k Pending

2. VDDK init image is not configured:
As in MTV-2.3 there was a change of moving the VDDK init image to MTV: Add provider,
and it is an obligatory field I could not create the scenario of having it not configured.
What I did instead was setting a wrong value for it. That resulted a different CDI importer response - The impoter pod was in PodInitializing state,
and that state is also propagated to MTV Migration UI
See "wrong_vddk_screenshot" attached

There is no "message" field in the DV.

=====================

Mike,

Regarding scenario #1,
there seem to be a duplication of the status displayed in the UI, repeating twice at the beginning:
"Pending - Pending; PVC istein1-vm-35010-gwd4k Pending"

Sam,

Regarding scenario #2,
Is there a way we can reflect to the user vddk init image URL is wrong?
I understand that this can't be validated when adding vddk init image in UI, but maybe at a later stage it can be spotted and reported?

Comment 15 Mike Turley 2022-03-10 22:15:43 UTC
> Regarding scenario #1,
> there seem to be a duplication of the status displayed in the UI, repeating twice at the beginning:
> "Pending - Pending; PVC istein1-vm-35010-gwd4k Pending"

For each pipeline step, the UI renders both the `phase` and `reason` properties of the step, joined by a dash. So in this case the step object contains a `phase` of "Pending" and a `reason` of `Pending; PVC istein1-vm-35010-gwd4k Pending`. This could be corrected on the backend by removing that first Pending from the `reason` field.

Comment 16 Sam Lucidi 2022-03-11 16:32:29 UTC
I can't really fix that message on the backend in a general way. The DataVolume reports a phase, a reason, and an extended message elaborating on the reason. The controller simplifies the latter two into one field called `reason` that contains the short reason and the message. In this case, the phase, reason, and message all include the word "pending". If it were Pending for a different reason, like in the case of the VDDK image being missing, we'd see something like the reason field containing "AwaitingVDDK; <message about why it's waiting>".

MTV does not really have any way to know if the image URL the user provided is correct or not. It's getting that message about the importer pod from the DataVolume's status, and if the DataVolume doesn't recognize it as an error state then MTV can't do much about it.

Comment 17 Mike Turley 2022-03-11 20:08:48 UTC
I could add some UI logic to check if the reason string starts with the same characters as the phase string, and if so, exclude the phase?

Comment 18 Ilanit Stein 2022-03-15 17:41:32 UTC
Thanks Sam, Mike,
I think we'll leave it as is for now.

On mtv-2.3.0-37:

"1. A suitable storage cannot be found" case:
 was tested and now the DV message is propagated to MTV UI 

"2. VDDK init image is not configured" case:
On MTV-2.3 It is not possible to reach to the "AwaitingVDDK reason.
Not even when the provider, plan and migration CRs are added from CLI.
Therefore it is not possible to check the DV message 
("message: waiting for v2v-vmware configmap for VDDK image" in this case) is propagated to MTV. 


Based on the above moving bug to VERIFIED.

Comment 22 errata-xmlrpc 2022-04-04 18:03:40 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.3.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-2022:1183


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