Bug 1739151
| Summary: | [WEB UI]: Unable to access Migration UI when OCP 3 cluster has the migration controller | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Roshni <rpattath> |
| Component: | Migration Tooling | Assignee: | Erik Nelson <ernelson> |
| Status: | CLOSED ERRATA | QA Contact: | Roshni <rpattath> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.2.0 | CC: | dwhatley, ibolton, jmatthew, jmontleo, sregidor, xjiang |
| Target Milestone: | --- | ||
| Target Release: | 4.2.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-10-16 06:35:17 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: | |||
|
Description
Roshni
2019-08-08 16:00:00 UTC
@roshni, which ocp3 version it failed? or it failed from ocp3.7 to ocp3.11? From browser logs we see the browser received a 403 from backend, then looks like UI had a bug in decoding the error. Assuming something related to configuration of oauthclient on OCP 3 side. Note the configuration of CORS is only need on the host of the controller/ui, for this case that is only OCP 3 side. So the configuration of CORS on OCP 4 is not needed for this scenario. We have confirmed being able to test OCP 3.10 to 3.11 migrations via WebUI. (In reply to Roshni from comment #0) > Description of problem: > Login Failure and Alert error when trying to access migration UI - migration > controller configured on OCP 3. > > Version-Release number of selected component (if applicable): > https://quay.io/repository/ocpmigrate/mig-ui/manifest/sha256: > d73f9b418c8571cf6063b420f88e87624425b33e89126b5a18235663ae5cc7de > https://quay.io/repository/ocpmigrate/mig-operator/manifest/sha256: > 1df62f5ce345f56520a8d0b9795fa9bc55fcac9c04a029f6ddf4da638b055a32 > > > How reproducible: > > > Steps to Reproduce: > 1. Create OCP 3.11 and OCP 4.2 clusters. > 2. CLone https://github.com/fusor/mig-operator on OCP 3 cluster and edit > controller.yml as follows > # cat mig-operator/controller.yml > apiVersion: migration.openshift.io/v1alpha1 > kind: MigrationController > metadata: > name: migration-controller > namespace: mig > spec: > cluster_name: host > migration_velero: true > migration_controller: true > migration_ui: true > #To install the controller on Openshift 3 you will need to configure the > API endpoint: > mig_ui_cluster_api_endpoint: https://<ocp3-hostname>:8443/api Looks like the issue was the api at the end of the url is not required. Also https://github.com/fusor/mig-operator/pull/90 to fix the sample endpoint in controller-3.yaml > 3. oc create -f operator.yml > 4. oc create -f controller.yaml > 5. corsAllowedOrigins: > - //<output-of-oc get -n mig route/migration -o go-template='{{ .spec.host > }}{{ println }}'-on-OCP3> > 6. master-restart api > 7. Create an stateless nginx app to migrate. > > On OCP 4 do the following steps: > 1. CLone https://github.com/fusor/mig-operator on OCP 4 cluster and edit > controller.yml as follows > # cat mig-operator/controller.yml > apiVersion: migration.openshift.io/v1alpha1 > kind: MigrationController > metadata: > name: migration-controller > namespace: mig > spec: > cluster_name: host > migration_velero: true > migration_controller: false > migration_ui: false > #To install the controller on Openshift 3 you will need to configure the > API endpoint: > mig_ui_cluster_api_endpoint: https://<ocp3-hostname>:8443/api > > 2. oc edit authentication.operator cluster and ensure the following exist: > > spec: > unsupportedConfigOverrides: > corsAllowedOrigins: > - //localhost(:|$) > - //127.0.0.1(:|$) > - //<output-of-oc get -n mig route/migration -o go-template='{{ > .spec.host }}{{ println }}'-on-OCP3> > > 3. oc edit kubeapiserver.operator cluster and ensure the following exist: > > spec: > unsupportedConfigOverrides: > corsAllowedOrigins: > - //<output-of-oc get -n mig route/migration -o go-template='{{ > .spec.host }}{{ println }}'-on-OCP3> > > 4. oc create -f operator.yml > 5. oc create -f controller.yml > > Try to access the Migration Web UI > https://<output-of-oc get -n mig route/migration -o go-template='{{ > .spec.host }}{{ println }}'-on-OCP3> > > Actual results: > Web UI is not accessible > > Expected results: > Web UI should be accessible > > Additional info: > Error on the browser > > action LOGIN_FAILURE @ 09:28:25.190 > app.bundle.js:262 prev state {router: {…}, auth: {…}, common: {…}, cluster: > {…}, storage: {…}, …} > app.bundle.js:262 action {type: "LOGIN_FAILURE"} > app.bundle.js:262 next state {router: {…}, auth: {…}, common: {…}, cluster: > {…}, storage: {…}, …} > app.bundle.js:262 action ALERT_ERROR_TIMEOUT @ 09:28:25.223 > app.bundle.js:262 prev state {router: {…}, auth: {…}, common: {…}, cluster: > {…}, storage: {…}, …} > app.bundle.js:262 action {type: "ALERT_ERROR_TIMEOUT", params: Error: > Request failed with status code 403 > at e.exports (https://migration-mig.apps.0807-ydp.qe.…} > app.bundle.js:262 next state {router: {…}, auth: {…}, common: {…}, cluster: > {…}, storage: {…}, …} > app.bundle.js:262 action ALERT_ERROR @ 09:28:25.223 > app.bundle.js:262 prev state {router: {…}, auth: {…}, common: {…}, cluster: > {…}, storage: {…}, …} > app.bundle.js:262 action {type: "ALERT_ERROR", text: Error: Request > failed with status code 403 > at e.exports (https://migration-mig.apps.0807-ydp.qe.…, > @@redux-saga/SAGA_ACTION: true} > app.bundle.js:262 error TypeError: t.text.trim is not a function > at Object.ALERT_ERROR (app.bundle.js:262) > at t.default (app.bundle.js:262) > at app.bundle.js:12 > at app.bundle.js:262 > at g (app.bundle.js:12) > at app.bundle.js:18 > at app.bundle.js:262 > at app.bundle.js:262 > at app.bundle.js:262 > at dispatch (app.bundle.js:12) 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, 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-2019:2922 |