Bug 2008596 - Web console crashes when MigStorage CR, with Secret CR outside the 'openshift-config' namespace, is deleted
Summary: Web console crashes when MigStorage CR, with Secret CR outside the 'openshift...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: UI
Version: 1.6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 1.6.1
Assignee: Ian
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-28 16:05 UTC by Sergio
Modified: 2021-10-28 09:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-28 09:48:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-ui pull 1347 0 None open Bug 2008596: Add error message to alert error modal to fix crash 2021-09-28 21:15:43 UTC
Github konveyor mig-ui pull 1352 0 None open Bug 2008596: Add error message to alert error modal to fix crash (#1347) 2021-10-12 16:04:16 UTC
Red Hat Product Errata RHBA-2021:4023 0 None None None 2021-10-28 09:48:06 UTC

Description Sergio 2021-09-28 16:05:58 UTC
Description of problem:
When we create a migration storage using a secret that is not placed inside openshift-config namespace and we delete it, the UI crashes.


Version-Release number of selected component (if applicable):
MTC 1.6.0
SOURCE CLUSTER: AWS 4.8 MTC 1.6.0
TARGET CLUSTER: AWS 4.9 MTC 1.6.0

How reproducible:
Always

Steps to Reproduce:
1. Remove all migration storage resources

2. Create this minio migration storage

SECRET

$ cat <<EOF | oc create -f -
apiVersion: v1
data:
  aws-access-key-id: ZmFrZXNlY3JldA==
  aws-secret-access-key: ZmFrZXNlY3JldA==
kind: Secret
metadata:
  name: aws.automation.test-creds
  namespace: openshift-migration
type: Opaque
EOF


MIGSTORAGE

$ cat <<EOF | oc create -f -
apiVersion: migration.openshift.io/v1alpha1
kind: MigStorage
metadata:
  name: aws.automation.test
  namespace: openshift-migration
spec:
  backupStorageConfig:
    awsBucketName: miniobucket
    awsS3Url: http://minio-minio.apps.cam-xxx-xxx.yy.xxx.xxx.com
    credsSecretRef:
      name: aws.automation.test-creds
      namespace: openshift-migration
    insecure: true
  backupStorageProvider: aws
  volumeSnapshotConfig:
    credsSecretRef:
      name: aws.automation.test-creds
      namespace: openshift-migration
  volumeSnapshotProvider: aws
EOF



3. Go to the UI and delete the migration storage created in step 2


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

app.bundle.js:2 Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bmessage%2C%20name%2C%20stack%2C%20config%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

app.bundle.js:2 Uncaught (in promise) Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bmessage%2C%20name%2C%20stack%2C%20config%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.


Expected results:
The UI should not crash

Additional info:
In order to make the UI work again we can go to (in a chrome browser)

right click -> inspect -> Application -> Storage -> Local Storage  -> 

And remove the keys "persist:root" and "currentUser"

After removing those keys refresh the UI and it will start working again without problems.

Comment 8 ssingla 2021-10-18 06:51:56 UTC
Verified with 1.6.1 on aws 4.8 -> 4.9 
The UI did not crash on deleting the migstorage.

Moving from ON_QA to VERIFIED.

Comment 12 errata-xmlrpc 2021-10-28 09:48:01 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) 1.6.1 release advisory), 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-2021:4023


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