Bug 2067708

Summary: MTV GUI shows error when creating network and storage mapping with CLI and using name instead of Id
Product: Migration Toolkit for Virtualization Reporter: Karim Latouche <klatouch>
Component: User ExperienceAssignee: Mike Turley <mturley>
Status: CLOSED ERRATA QA Contact: Igor Braginsky <ibragins>
Severity: urgent Docs Contact: Richard Hoch <rhoch>
Priority: high    
Version: 2.2.0CC: fbladilo, ibragins, mguetta, mturley
Target Milestone: ---   
Target Release: 2.3.2   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-21 13:48:39 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:
Bug Depends On:    
Bug Blocks: 2023801    
Attachments:
Description Flags
GUI shows error
none
MTV UI 2.3.1-5 none

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