Bug 2062862

Summary: [MTC UI] Clusters page behaving unexpectedly on deleting the remote cluster’s service account secret from backend
Product: Migration Toolkit for Containers Reporter: ssingla
Component: UIAssignee: Ian <ibolton>
Status: CLOSED ERRATA QA Contact: Prasad Joshi <prajoshi>
Severity: low Docs Contact: Richard Hoch <rhoch>
Priority: low    
Version: 1.7.0CC: ernelson, prajoshi, rjohnson
Target Milestone: ---   
Target Release: 1.7.2   
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: 2022-07-01 09:53:11 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 ssingla 2022-03-10 17:53:24 UTC
Description of the problem: On deleting the remote cluster’s service account secret present in openshift-config namespace, the Clusters page in the MTC UI does not get updated on its own and on updating it, it gets stuck.

Severity: Medium

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


Steps to reproduce:
1. Login to the MTC console and add the remote cluster to the MTC UI.
2. Login to the controller cluster and remove the source cluster’s service account secret from openshift-config namespace.
3. Check the migcluster yaml from backend. It will show 2 critical warnings
- category: Critical
    lastTransitionTime: "2022-03-10T14:03:24Z"
    message: 'The `serviceAccountSecretRef` must reference a valid `secret`, subject:
      openshift-config/source-cluster-wj6rl.'
    reason: NotFound
    status: "True"
    type: InvalidSaSecretRef
  - category: Critical
    lastTransitionTime: "2022-03-10T14:03:24Z"
    message: 'Reconcile failed: [Service Account Secret not found for source-cluster].
      See controller logs for details.'
    status: "True"
    type: ReconcileFailed



4. Check the Clusters page on the MTC console.


Actual Result: 
The status of the remote cluster stays Connected. Also, if we update it by clicking on Edit option for that cluster, it shows the connection failure but the UI gets stuck on closing the wizard.

Expected Result: 
The status of the remote cluster should be updated in the UI as disconnected.

Comment 5 Prasad Joshi 2022-06-16 13:15:22 UTC
Verified with MTC 1.7.2 prestage 

After removing the secrets from backend the cluster status is getting updated to the "Connection Failed".

Moving this to verified status.

Comment 6 Prasad Joshi 2022-06-16 13:16:24 UTC
Also the UI doesn't get stuck on closing wizard

Comment 12 errata-xmlrpc 2022-07-01 09:53:11 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 (Moderate: Migration Toolkit for Containers (MTC) 1.7.2 security and bug fix update), 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/RHSA-2022:5483