Bug 1897044

Summary: MTC 1.3.2 stage images stored in index image is pointing to registry.redhat.io registry
Product: Migration Toolkit for Containers Reporter: Xin jiang <xjiang>
Component: GeneralAssignee: Jason Montleon <jmontleo>
Status: CLOSED NOTABUG QA Contact: Xin jiang <xjiang>
Severity: urgent Docs Contact: Avital Pinnick <apinnick>
Priority: unspecified    
Version: 1.3.zCC: chezhang, ernelson, sregidor, whu
Target Milestone: ---   
Target Release: ---   
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: 2020-11-19 13:34:23 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 Xin jiang 2020-11-12 07:32:21 UTC
Description of problem:
When trying to install stage MTC1.3.2 in OCP4.6, the operator install failed due t o  "Failed to pull image"
 

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

How reproducible:
Always

Steps to Reproduce:
Try to install operator but it failed

Actual results:
1. Check operator pod
$ oc describe pod migration-operator-76f44d46bb-6vmn7 -n openshift-migration
.....
  Normal   Pulling         12m (x4 over 14m)     kubelet, ip-10-0-188-92.us-east-2.compute.internal  Pulling image "registry.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:ca6161433d31bfd6bc2f51eb1c36bc362176b192d2b8c1af65186800244d1e56"
  Warning  Failed          12m (x4 over 14m)     kubelet, ip-10-0-188-92.us-east-2.compute.internal  Failed to pull image "registry.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:ca6161433d31bfd6bc2f51eb1c36bc362176b192d2b8c1af65186800244d1e56": rpc error: code = Unknown desc = Error reading manifest sha256:ca6161433d31bfd6bc2f51eb1c36bc362176b192d2b8c1af65186800244d1e56 in registry.redhat.io/rhmtc/openshift-migration-rhel7-operator: error parsing HTTP 404 response body: invalid character 'N' looking for beginning of value: "Not found\n"
......

2. Check index image stored in stage registry
$ oc adm catalog mirror  registry-proxy.engineering.redhat.com/rh-osbs/iib-pub-pending:v4.6 quay-enterprise-quay-enterprise.apps.cam-tgt-10720.qe.devcluster.openshift.com/admin/iib-pub-pending:v4.6 --insecure --manifests-only
src image has index label for database path: /database/index.db
using database path mapping: /database/index.db:/tmp/326274033
wrote database to /tmp/326274033
using database at: /tmp/326274033/index.db
.....
$ echo "select * from related_image where operatorbundle_name like '%mtc-operator%';" | sqlite3 -line  /tmp/326274033/index.db
.....
              image = registry.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:ca6161433d31bfd6bc2f51eb1c36bc362176b192d2b8c1af65186800244d1e56
operatorbundle_name = mtc-operator.v1.3.2
              image = registry.redhat.io/rhmtc/openshift-migration-controller-rhel8@sha256:aedb8cd4c7ac075653d004ae3c07f50e89a97df9664cbf7d768f93e06721201d
operatorbundle_name = mtc-operator.v1.3.2
              image = registry.redhat.io/rhmtc/openshift-migration-hook-runner-rhel7@sha256:ccfb9600838f71fbd91511ac04cfcbc70b3d541ffef1920838d5ee2e0483a31f
operatorbundle_name = mtc-operator.v1.3.2

Expected results:
The operator should be installed in OCP4.6 successfully

Additional info:

Comment 2 Xin jiang 2020-11-19 13:34:23 UTC
closed. As we need to apply imagecontentsourcepolicy to map to brew registry. the install is not a problem