Bug 1975863 - Web console crashes if migration plan status is "not ready"
Summary: Web console crashes if migration plan status is "not ready"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: UI
Version: 1.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 1.5.0
Assignee: John Matthews
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-24 15:20 UTC by Sergio
Modified: 2021-07-28 04:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-28 04:08:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-ui pull 1256 0 None open Bug 1975863: check for existing plan name and migration name 2021-06-24 15:24:07 UTC
Github konveyor mig-ui pull 1257 0 None open Bug 1975863: Add check for plan name and migration name for debug link 2021-06-24 15:26:18 UTC
Red Hat Product Errata RHEA-2021:2929 0 None None None 2021-07-28 04:08:22 UTC

Description Sergio 2021-06-24 15:20:56 UTC
Description of problem:
When there are migplans that are not ready, the UI cannot display the migration plans and shows an error in the browser's console

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

How reproducible:
Always

Steps to Reproduce:
1. Create  migration plan

$ oc get migplan
NAME      READY     SOURCE    TARGET           STORAGE   AGE
tests     True      host      target-cluster   noobaa    1m


2. Edit the migration plan in order to close it. Add "spec.closed: true" to the migplan yaml info.

oc edit migplan <MIGPLANNAME>
...
spec:
  closed: true

3. The migration plan is in not-ready status now

$ oc get migplan
NAME      READY     SOURCE    TARGET           STORAGE   AGE
tests               host      target-cluster   noobaa    1m

4. Go to the UI and open the migration plans screen

Actual results:
The UI crashes and we can see this error in the browser's console

app.bundle.js:2 TypeError: Cannot read property 'metadata' of null
    at t.default (app.bundle.js:2)
    at ci (app.bundle.js:2)
    at Ui (app.bundle.js:2)
    at jr (app.bundle.js:2)
    at bs (app.bundle.js:2)
    at Ms (app.bundle.js:2)
    at Os (app.bundle.js:2)
    at hs (app.bundle.js:2)
    at app.bundle.js:2
    at t.unstable_runWithPriority (app.bundle.js:2)
ar @ app.bundle.js:2
app.bundle.js:2  action UPDATE_PLAN_LIST @ 17:01:27.139
app.bundle.js:2 TypeError: Cannot read property 'metadata' of null
    at t.default (app.bundle.js:2)
    at ci (app.bundle.js:2)
    at Ui (app.bundle.js:2)
    at jr (app.bundle.js:2)
    at bs (app.bundle.js:2)
    at Ms (app.bundle.js:2)
    at Os (app.bundle.js:2)
    at hs (app.bundle.js:2)
    at app.bundle.js:2
    at t.unstable_runWithPriority (app.bundle.js:2)
v @ app.bundle.js:2
app.bundle.js:2 The above error occurred in task A
    created by anonymous
    created by anonymous

Expected results:
The UI should be able to display not-ready migration plans without problems

Additional info:

Comment 4 Sergio 2021-07-01 09:39:49 UTC
Verified using MTC 1.5.0

  openshift-migration-rhel7-operator@sha256:aeda48329c452082e03052d7bd2fc71e9762469540cdb60eb4d4004418f2a0c7
    - name: MIG_CONTROLLER_REPO
      value: openshift-migration-controller-rhel8@sha256
    - name: MIG_CONTROLLER_TAG
      value: 7f109e3ac03acf8f1524033bbbc10b987eeaad81856a3bc03851e1b571e8a9c7
    - name: MIG_UI_REPO
      value: openshift-migration-ui-rhel8@sha256
    - name: MIG_UI_TAG
      value: e7f42e2a120aea489fd083428452049a835910971cef27a5b7e5dded153f0dae

The UI does not crash any more with not-ready migplans.

Moved to VERIFIED.

Comment 10 errata-xmlrpc 2021-07-28 04:08:13 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 (Migration Toolkit for Containers (MTC) image release advisory 1.5.0), 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:2929


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