Bug 1746635

Summary: Can't mirror image with sha to internal registry return 500 error
Product: OpenShift Container Platform Reporter: XiuJuan Wang <xiuwang>
Component: Image RegistryAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED NOTABUG QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.0CC: adam.kaplan, anli, aos-bugs, bparees, mifiedle, obulatov, scuppett, xtian
Target Milestone: ---Keywords: Reopened
Target Release: 4.3.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-11-01 21:02:50 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 XiuJuan Wang 2019-08-29 03:17:50 UTC
Description of problem:
When mirror image with sha to internal registry,will meet error:
error: unable to push manifest to default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com/xiu1/python-36-rhel7: received unexpected HTTP status: 500 Internal Server Error

Could mirror image with tag succeed.


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

Client Version: version.Info{Major:"", Minor:"", GitVersion:"v4.2.0-alpha.0-31-gd54a9419", GitCommit:"d54a94198086dfc29775db847049ff212d06de5f", GitTreeState:"clean", BuildDate:"2019-08-27T23:05:36Z", GoVersion:"go1.12.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.0+a6a3e09", GitCommit:"a6a3e09", GitTreeState:"clean", BuildDate:"2019-08-26T23:00:48Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}
OpenShift Version: 4.2.0-0.nightly-2019-08-27-105356

How reproducible:
always

Steps to Reproduce:
1.Docker login internal registry with external route.
2.Mirror image with tag
3.Mirror image with sha

Actual results:
step2:
oc image mirror mirror-registry.qe.devcluster.openshift.com:5000/rhscl/python-36-rhel7@sha256:ea9011ba8b2bfb8aaabd415350ae4de2115818f1767509eafe4ee4d354daa12e default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com/xiu1/python-36-rhel7:v1
default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com/
  xiu1/python-36-rhel7
    manifests:
      sha256:ea9011ba8b2bfb8aaabd415350ae4de2115818f1767509eafe4ee4d354daa12e -> v1
  stats: shared=0 unique=0 size=0B

phase 0:
  default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com xiu1/python-36-rhel7 blobs=0 mounts=0 manifests=1 shared=0

info: Planning completed in 1.55s
sha256:ea9011ba8b2bfb8aaabd415350ae4de2115818f1767509eafe4ee4d354daa12e default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com/xiu1/python-36-rhel7:v1
info: Mirroring completed in 110ms (0B/s)

step 3:
$ oc image mirror mirror-registry.qe.devcluster.openshift.com:5000/rhscl/python-36-rhel7@sha256:ea9011ba8b2bfb8aaabd415350ae4de2115818f1767509eafe4ee4d354daa12e default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com/xiu1/python-36-rhel7 
default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com/
  xiu1/python-36-rhel7
    manifests:
      {}
  stats: shared=0 unique=0 size=0B

phase 0:
  default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com xiu1/python-36-rhel7 blobs=0 mounts=0 manifests=1 shared=0

info: Planning completed in 1.3s
error: unable to push manifest to default-route-openshift-image-registry.apps.jialiu-share0828.qe.devcluster.openshift.com/xiu1/python-36-rhel7: received unexpected HTTP status: 500 Internal Server Error
info: Mirroring completed in 100ms (0B/s)
error: one or more errors occurred while uploading images

Expected results:
Should mirror image with sha succeed.

Additional info:

Comment 3 XiuJuan Wang 2019-09-02 09:37:33 UTC
Sorry to delay your developing process, qe can't install disconnect env successfully this day.
I will add must-gather log when I get a cluster.

Comment 5 XiuJuan Wang 2019-10-10 10:17:11 UTC
Qe could reproduce this issue in connected env.
Here is mirror cmd log
http://pastebin.test.redhat.com/804748

this is must-gather logs http://virt-openshift-05.lab.eng.nay.redhat.com/xiuwang/bz1746635/

Comment 6 Oleg Bulatov 2019-10-10 10:31:43 UTC
There is no the openshift-image-registry namespace at http://virt-openshift-05.lab.eng.nay.redhat.com/xiuwang/bz1746635/namespaces/ and therefore no registry logs, is it the full dump? Did must-gather succeed?

Comment 7 Ben Parees 2019-10-10 14:02:48 UTC
Are you able to docker push to your registry manually?

Can image builds run on your cluster successfully push to your registry?

(trying to understand if this is specific to oc adm image mirror, or perhaps the specific image you are mirroring).

Comment 9 Ben Parees 2019-10-10 14:25:58 UTC
I don't see any 500 errors or indications of sha ea9011ba8b2bfb8aaabd415350ae4de2115818f1767509eafe4ee4d354daa12e in the registry logs.

I also don't see a route exposing the openshift registry?

Comment 10 Ben Parees 2019-10-10 14:27:18 UTC
$ oc get configs.imageregistry.operator.openshift.io/cluster -o yaml | grep Route  
  defaultRoute: false