Bug 1877439 - [ MTC-UI ] Cannot update the remote cluster ssl certificate information when secret is not in openshift-config namespace
Summary: [ MTC-UI ] Cannot update the remote cluster ssl certificate information when ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: General
Version: 1.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 1.4.0
Assignee: Ian
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-09 16:02 UTC by Sergio
Modified: 2021-02-11 12:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-11 12:54:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:5329 0 None None None 2021-02-11 12:55:07 UTC

Description Sergio 2020-09-09 16:02:46 UTC
Description of problem:
After adding a remote cluster successfully, if the secret is not located in openshift-config namespace, when we try to update it there is an error in the browser's console and the update cannot be done.

Version-Release number of selected component (if applicable):
CMT 1.3
OCP TARGET: AZURE 4.5
OCP SOURCE: AZURE 4.2
Browser: Chrome

How reproducible:
Always

Steps to Reproduce:
1. Add a remote cluster without ssl certificate. The cluster's secret is in openshift-migration namespace, not in openshift-config namespace. Look at the resource definition in 'Additional info' section.

In order to use a namespace different from openshift-config, we need to create the resource without using the UI.

  serviceAccountSecretRef:
    name: sa-token-source-cluster
    namespace: openshift-migration  <---- this location



2. Once it's connected properly, click "Edit" on the UI
3. Click on "Require SSL Validation"
4. On "CA bundle file", click "Browse" and add a certificate file
5. Click "Update cluster"

Actual results:
The screen does not change, and an error is shown in the browsers console. You can see the error at the end of this summary in the "Additional info" section.


Expected results:
The certificate file should be added and the new connection to the cluster should be done using this certificate.

In previous versions the cluster's secret could be placed in any namespace.


Additional info:


Resource MigCluster
apiVersion: migration.openshift.io/v1alpha1
kind: MigCluster
metadata:
  name: source-cluster
  namespace: openshift-migration
spec:
  insecure: true
  isHostCluster: false
  serviceAccountSecretRef:
    name: sa-token-source-cluster
    namespace: openshift-migration
  storageClasses:
  - accessModes:
    - ReadWriteOnce
    default: true
    name: managed-premium
    provisioner: kubernetes.io/azure-disk
  url: https://api.cam-src-8220.qe.azure.devcluster.openshift.com:6443
status:
  conditions:
  - category: Required
    lastTransitionTime: "2020-09-09T14:28:52Z"
    message: The cluster is ready.
    status: "True"
    type: Ready
  observedDigest: 75c4ac996567aab9bc1967ef083ad1547fc44218768ee9e5d3d0cb1350fe9503




Error shown in console:

app.bundle.js:63 GET https://api.XXXX-az452.qe.azure.devcluster.openshift.com:6443/api/v1/namespaces/openshift-config/secrets/sa-token-source-cluster 404
(anonymous) @ app.bundle.js:63
e.exports @ app.bundle.js:63
e.exports @ app.bundle.js:143
Promise.then (async)
l.request @ app.bundle.js:143
r.forEach.l.<computed> @ app.bundle.js:143
(anonymous) @ app.bundle.js:63
get @ app.bundle.js:143
h @ app.bundle.js:90
m @ app.bundle.js:153
l @ app.bundle.js:153
Promise.then (async)
T @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
h @ app.bundle.js:153
m @ app.bundle.js:153
l @ app.bundle.js:153
k.<computed> @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
h @ app.bundle.js:153
m @ app.bundle.js:153
V @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
m @ app.bundle.js:153
k.<computed> @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
h @ app.bundle.js:153
m @ app.bundle.js:153
l @ app.bundle.js:153
s @ app.bundle.js:153
L.e.put @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
p @ app.bundle.js:153
v @ app.bundle.js:153
u @ app.bundle.js:153
A.e.put @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
(anonymous) @ app.bundle.js:151
updateCluster @ app.bundle.js:63
onAddEditSubmit @ app.bundle.js:63
handleSubmit @ app.bundle.js:138
n.handleSubmit @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
Promise.then (async)
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
h @ app.bundle.js:106
x @ app.bundle.js:106
(anonymous) @ app.bundle.js:106
O @ app.bundle.js:106
A @ app.bundle.js:106
S @ app.bundle.js:106
T @ app.bundle.js:106
Cn @ app.bundle.js:106
se @ app.bundle.js:106
An @ app.bundle.js:106
kn @ app.bundle.js:106
Tn @ app.bundle.js:106
t.unstable_runWithPriority @ app.bundle.js:114
Yo @ app.bundle.js:106
ce @ app.bundle.js:106
Sn @ app.bundle.js:106
Show 13 more frames
app.bundle.js:16 Error: Request failed with status code 404
    at e.exports (app.bundle.js:63)
    at e.exports (app.bundle.js:143)
    at XMLHttpRequest.u.onreadystatechange (app.bundle.js:63)
b @ app.bundle.js:16
b @ app.bundle.js:153
c @ app.bundle.js:153
t.cont @ app.bundle.js:153
m @ app.bundle.js:153
l @ app.bundle.js:153
n @ app.bundle.js:16
l @ app.bundle.js:153
b @ app.bundle.js:153
c @ app.bundle.js:153
t.cont @ app.bundle.js:153
b @ app.bundle.js:153
c @ app.bundle.js:153
t.cont @ app.bundle.js:153
b @ app.bundle.js:153
c @ app.bundle.js:153
t.cont @ app.bundle.js:153
m @ app.bundle.js:153
l @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
Promise.then (async)
T @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
h @ app.bundle.js:153
m @ app.bundle.js:153
l @ app.bundle.js:153
Promise.then (async)
T @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
h @ app.bundle.js:153
m @ app.bundle.js:153
l @ app.bundle.js:153
k.<computed> @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
h @ app.bundle.js:153
m @ app.bundle.js:153
V @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
m @ app.bundle.js:153
k.<computed> @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
h @ app.bundle.js:153
m @ app.bundle.js:153
l @ app.bundle.js:153
s @ app.bundle.js:153
L.e.put @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
p @ app.bundle.js:153
v @ app.bundle.js:153
u @ app.bundle.js:153
A.e.put @ app.bundle.js:153
(anonymous) @ app.bundle.js:153
(anonymous) @ app.bundle.js:151
updateCluster @ app.bundle.js:63
onAddEditSubmit @ app.bundle.js:63
handleSubmit @ app.bundle.js:138
n.handleSubmit @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
Promise.then (async)
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
(anonymous) @ app.bundle.js:29
h @ app.bundle.js:106
x @ app.bundle.js:106
(anonymous) @ app.bundle.js:106
O @ app.bundle.js:106
A @ app.bundle.js:106
S @ app.bundle.js:106
T @ app.bundle.js:106
Cn @ app.bundle.js:106
se @ app.bundle.js:106
An @ app.bundle.js:106
kn @ app.bundle.js:106
Tn @ app.bundle.js:106
t.unstable_runWithPriority @ app.bundle.js:114
Yo @ app.bundle.js:106
ce @ app.bundle.js:106
Sn @ app.bundle.js:106
Show 28 more frames
app.bundle.js:16 The above error occurred in task h
    created by takeLatest(UPDATE_CLUSTER_REQUEST, h)
    created by anonymous
    created by anonymous
Tasks cancelled due to error:
takeLatest(UPDATE_CLUSTER_REQUEST, h)

Comment 2 Erik Nelson 2020-09-24 17:14:04 UTC
I'm not able to reproduce this, could you reconfirm?

Comment 3 Xin jiang 2020-09-25 07:30:34 UTC
I confirmed that I can reproduce this.

Comment 6 Ian 2020-12-15 21:24:19 UTC
https://github.com/konveyor/mig-ui/pull/1091 Merged and cherry picked to release-1.4.0

Comment 10 Sergio 2020-12-21 15:02:12 UTC
Verified using MTC 1.4.0

openshift-migration-ui-rhel8@sha256:6aabdf05a9b795cde3a224be3ad917d4246e17db66fba9910080eeb460aed7d8

Comment 12 errata-xmlrpc 2021-02-11 12:54:46 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) 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


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