Description of problem: When we deploy the controller pod and the UI in the 3.x cluster, the UI does not work. Version-Release number of selected component (if applicable): MTC 1.3.1 stage OCP 3.11 AWS Browser: Chrome, Firfox How reproducible: Always Steps to Reproduce: 1. Install MTC 1.3.1 from stage repository in a 3.11 OCP cluster 2. Set up the migration controller like this azure_resource_group: "" cluster_name: host mig_ui_cluster_api_endpoint: https://ec2-XXX-XXX-XX-XX-XX.XXXX.amazonaws.com:8443 <------ migration_controller: true <------ migration_ui: true <------ migration_velero: true restic_timeout: 1h 3. Configure the cors in the master-config.yml file 4. Try to access the Migration UI Actual results: The UI fails and shows the following error in the browser's console app.bundle.js:106 TypeError: Expected "authorizationUri" to exist app.bundle.js:16 TypeError: e.toJSON is not a function app.bundle.js:16 The above error occurred in task u created by takeLatest(FETCH_OAUTH_META, u) created by anonymous created by anonymous Tasks cancelled due to error: takeLatest(FETCH_OAUTH_META, u) takeLatest(LOGOUT_USER_REQUEST, v) takeLatest(INIT_FROM_STORAGE, h) takeLatest(FETCH_TOKEN, m) takeLatest(LOGIN_SUCCESS, y) takeLatest(FETCH_TENANT_NAMESPACES, g) Expected results: The UI should redirect the user to the cluster's login screen, and once authenticated he should be able to access the MTC UI. Additional info:
The problem was due to the way used to configure the migrationcontroller resource in order to deploy the UI and the controller. We executed the following steps: - Configure the migrationcontroller resource with these values: migration_controller: true migration_ui: true - later on, we added this field to the migrationcontroller resource: mig_ui_cluster_api_endpoint: https://XXXXXXX.XXXX-1.XXXXX.com:8443 The second step does not restart the UI pod, so the values available to the UI pod were not the right ones. After restarting the UI pod manually, it could read the right values and everything worked fine. In order to configure UI and controller in a 3.x cluster, migrationcontroller's values need to be provided in a single step (migration_ui and mig_ui_cluster_api_endpoint at the same time). Or, if configure mig_ui_cluster_api_endpoint value is configured later on, we need to restart the UI pod manually after the configuration.
Ready for QE. I have updated the Kbase article. See step 4 of "Installing the MTC on an OpenShift 3.x cluster": https://access.redhat.com/articles/5064151
verified https://access.redhat.com/articles/5064151.
I updated the "Configuring cross-origin resource sharing" section of the Kbase article (https://access.redhat.com/articles/5064151) after QE validation: >>> 2. Obtain the MTC URL: $ oc get -n openshift-migration route/migration -o go-template='https://{{ .spec.host }}' The output resembles the following: https://migration-openshift-migration.apps.cluster.openshift.com. 3. Add the MTC URL to the /etc/origin/master/master-config.yaml file of each master node under corsAllowedOrigins as in the following example: corsAllowedOrigins: - (?i}https://migration-openshift-migration\.apps\.cluster\.openshift\.com(:|\z) >>>
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) tool image release advisory 1.4.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/RHBA-2020:5329