Bug 2067708 - MTV GUI shows error when creating network and storage mapping with CLI and using name instead of Id
Summary: MTV GUI shows error when creating network and storage mapping with CLI and us...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: User Experience
Version: 2.2.0
Hardware: x86_64
OS: Unspecified
high
urgent
Target Milestone: ---
: 2.3.2
Assignee: Mike Turley
QA Contact: Igor Braginsky
Richard Hoch
URL:
Whiteboard:
: 1986020 (view as bug list)
Depends On:
Blocks: 2023801
TreeView+ depends on / blocked
 
Reported: 2022-03-24 00:05 UTC by Karim Latouche
Modified: 2022-07-21 13:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-21 13:48:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
GUI shows error (66.39 KB, image/png)
2022-03-24 00:05 UTC, Karim Latouche
no flags Details
MTV UI 2.3.1-5 (70.64 KB, image/png)
2022-05-04 09:59 UTC, Maayan Hadasi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github konveyor forklift-ui pull 948 0 None open Bug 2067708: Support source VMs, networks and datastores referenced either by id or name in plan and mapping objects 2022-03-31 16:38:31 UTC
Github konveyor forklift-ui pull 951 0 None Merged [Backport] Bug 2067708: Support source VMs, networks and datastores referenced either by id or name in plan and mapping ... 2022-05-02 16:21:22 UTC
Github konveyor forklift-ui pull 961 0 None open Bug 2067708: Fix invalid-mapping check to allow mapping items by name or id 2022-06-14 20:23:39 UTC
Red Hat Product Errata RHBA-2022:5679 0 None None None 2022-07-21 13:48:46 UTC

Description Karim Latouche 2022-03-24 00:05:44 UTC
Created attachment 1868019 [details]
GUI shows error

Description of problem:

When creating Mapping with API and specifying name instead of id for Network or Storage, GUI reports error


Version-Release number of selected component (if applicable):  2.2.0 running with OCP 4.9 or 4.10


How reproducible:


Steps to Reproduce:
1. Create mapping with CLI

cat << EOF | oc create -f -
apiVersion: forklift.konveyor.io/v1beta1
kind: NetworkMap
metadata:
  name: vlan1
  namespace: openshift-mtv
spec:
  map:
  - destination:
      name: vlan1
      namespace: default
      type: multus
    source:
      name: VM Network
  provider:
    destination:
      name: host
      namespace: openshift-mtv
    source:
      name: vcenter-lab
      namespace: openshift-mtv
EOF


2. Checking result with CLI


[root@registry ~]# oc describe networkmaps.forklift.konveyor.io vlan1
Name:         vlan1
Namespace:    openshift-mtv
Labels:       <none>
Annotations:  <none>
API Version:  forklift.konveyor.io/v1beta1
Kind:         NetworkMap
Metadata:
  Creation Timestamp:  2022-03-23T17:17:52Z
  Generation:          1
  Managed Fields:
    API Version:  forklift.konveyor.io/v1beta1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
        .:
        f:map:
        f:provider:
          .:
          f:destination:
            .:
            f:name:
            f:namespace:
          f:source:
            .:
            f:name:
            f:namespace:
    Manager:      kubectl-create
    Operation:    Update
    Time:         2022-03-23T17:17:52Z
    API Version:  forklift.konveyor.io/v1beta1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:conditions:
        f:observedGeneration:
        f:references:
    Manager:         manager
    Operation:       Update
    Subresource:     status
    Time:            2022-03-23T17:17:52Z
  Resource Version:  136855
  UID:               286b83f0-8078-493e-864b-4f42a23931ac
Spec:
  Map:
    Destination:
      Name:       vlan1
      Namespace:  default
      Type:       multus
    Source:
      Name:  VM Network
  Provider:
    Destination:
      Name:       host
      Namespace:  openshift-mtv
    Source:
      Name:       vcenter-lab
      Namespace:  openshift-mtv
Status:
  Conditions:
    Category:              Required
    Last Transition Time:  2022-03-23T17:17:52Z
    Message:               The network map is ready.
    Status:                True
    Type:                  Ready
  Observed Generation:     1
  References:
    Id:    network-1051
    Name:  VM Network
Events:
  Type    Reason  Age    From        Message
  ----    ------  ----   ----        -------
  Normal  Ready   3m25s  networkMap  The network map is ready.

3. Actual results:

GUI shows error when backend is fine

Expected results:

GUI should show mapping as OK

Additional info:

Comment 1 Jeff Ortel 2022-03-24 13:21:16 UTC
Discussed with Mike Turley - Estimated ~1 day effort with little regression risk.

Comment 2 Mike Turley 2022-05-02 15:55:34 UTC
Realized BZ automation never picked this up when the PR was merged. Moving to MODIFIED.

Comment 3 Mike Turley 2022-05-02 15:57:19 UTC
Ah nevermind, it was just never backported to release-v2.3.1

Comment 4 Mike Turley 2022-05-02 16:21:22 UTC
Backport merged (https://github.com/konveyor/forklift-ui/pull/951).

Comment 5 Maayan Hadasi 2022-05-04 09:59:43 UTC
Created attachment 1876940 [details]
MTV UI 2.3.1-5

The issue is reproducible with MTV 2.3.1-5 / iib: 225183
Screenshot is attached

Comment 6 Mike Turley 2022-05-04 14:50:20 UTC
For my reference later, the backport was reverted in https://github.com/konveyor/forklift-ui/pull/951.
I'll take another look at this when I can.

Comment 7 Mike Turley 2022-06-14 20:23:40 UTC
This should be fully resolved by https://github.com/konveyor/forklift-ui/pull/961. See PR description for details.

Comment 8 Igor Braginsky 2022-06-27 07:31:25 UTC
Verified this issue on MTV 2.3.2, looks good. No errors in UIs for any instance created in CLI using names.

Comment 9 Maayan Hadasi 2022-06-30 10:13:31 UTC
*** Bug 1986020 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2022-07-21 13:48:39 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.2 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/RHBA-2022:5679


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