Bug 2036908

Summary: [MTC] Velero credential is not getting updated for GCP and Azure
Product: Migration Toolkit for Containers Reporter: Prasad Joshi <prajoshi>
Component: ControllerAssignee: Dylan Murray <dymurray>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: high Docs Contact: Avital Pinnick <apinnick>
Priority: high    
Version: 1.7.0CC: dymurray, ernelson, rjohnson
Target Milestone: ---   
Target Release: 1.7.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: 2022-03-24 06:32:27 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 Prasad Joshi 2022-01-04 11:43:55 UTC
Description of problem: 
In recent PR velero credentials name has been changed to cloud-credential-gcp from gcp-cloud-credential. Now velero is taking credentials from cloud-credential-gcp secret. When we trigger migration MTC creates a new secret with the name gcp-cloud-credential and hence cloud-credential-gcp secret doesn’t get updated. Due this migration gets stuck at the prepare step. 


Version-Release number of selected component (if applicable):
MTC 1.7.0
SOURCE CLUSTER: GCP 4.6 MTC 1.7.0
TARGET CLUSTER: GCP 4.9 MTC 1.7.0


How reproducible:
Always


Steps to Reproduce:
1.  Once MTC + OADP is installed. Create a namespace in source cluster 
$ oc new-project test 
2.  Create a migplan
3. Execute migration 


Actual results: Migration gets stuck at prepare step


Expected results: Migration should be completed successfully.


Additional info: 
When we run migration secret is being created with older name gcp-cloud-credential

$ oc get secret -n openshift-migration
gcp-cloud-credentials                              Opaque                                1      38m

Cloud-credential-gcp secret is not getting updated

$ oc get secret -n openshift-migration cloud-credentials-gcp -o yaml
apiVersion: v1
data:
  cloud: "”

Comment 1 Avital Pinnick 2022-01-04 14:11:00 UTC
Prasad, do you want this fixed in docs?

Comment 7 Prasad Joshi 2022-01-31 11:00:20 UTC
Verified with MTC 1.7.0 

metadata_nvr: openshift-migration-operator-metadata-container-v1.7.0-25

$ oc get pods  migration-controller-55487bf554-7rf46 -o yaml
Image: registry.redhat.io/rhmtc/openshift-migration-controller-rhel8@sha256:99c6ca99cf59d18f11d9fd3c5ed7772e1fefd5ed75b6f64cb5729e34667925e1


Migration's are not getting stuck at prepare stage and secrets being used are correct. 

$ oc get secret -n openshift-migration
NAME                                               TYPE                                  DATA   AGE 
cloud-credentials                                  Opaque                                1      5h17m
cloud-credentials-azure                            Opaque                                1      5h17m
cloud-credentials-gcp                              Opaque                                1      5h17m


Moving this to verified status.

Comment 9 errata-xmlrpc 2022-03-24 06:32:27 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.7.0 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-2022:1043