Bug 2085414

Summary: Image pullthrough does not pass 429 errors back to capable clients
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Image RegistryAssignee: Flavian <fmissi>
Status: CLOSED ERRATA QA Contact: Keenon Lee <jitli>
Severity: high Docs Contact:
Priority: high    
Version: 4.7CC: fmissi, fpaoline, obulatov, rmarasch, wewang, xiuwang
Target Milestone: ---   
Target Release: 4.10.z   
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-06-07 13:24:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1923536    
Bug Blocks:    

Comment 2 Keenon Lee 2022-05-19 04:13:37 UTC
deployment.apps/registry created
service/registry created
route.route.openshift.io/registry created
redhat@jitli:~/work/src/test$ oc get route registry -o=jsonpath='{.status.ingress[0].host}'
registry-default.apps.ci-ln-36vygqk-76ef8.origin-ci-int-aws.dev.rhcloud.comredhat@jitli:~/work/src/test$ 
redhat@jitli:~/work/src/test$ REGISTRY=$(oc get route registry -o=jsonpath='{.status.ingress[0].host}')
redhat@jitli:~/work/src/test$ curl -XPOST -d 'c=50' "http://${REGISTRY}/"
redhat@jitli:~/work/src/test$ oc import-image busybox:latest --from="${REGISTRY}:80/default/busybox:latest" --confirm --insecure --reference-policy=local
imagestream.image.openshift.io/busybox imported

[root@preserve-olm-agent-test jitli]# podman push --tls-verify=false "${REGISTRY}/default/busybox:latest"
Getting image source signatures
Copying blob 6008d842465c done  
Copying config a711f05d33 done  
Writing manifest to image destination
Storing signatures
[root@preserve-olm-agent-test jitli]# IMAGE_REGISTRY=default-route-openshift-image-registry.apps.ci-ln-36vygqk-76ef8.origin-ci-int-aws.dev.rhcloud.com
[root@preserve-olm-agent-test jitli]# podman login -u kubeadmin -p
Login Succeeded!
[root@preserve-olm-agent-test jitli]# podman pull --tls-verify=false default-route-openshift-image-registry.apps.ci-ln-36vygqk-76ef8.origin-ci-int-aws.dev.rhcloud.com/default/busybox

Error: initializing source docker://default-route-openshift-image-registry.apps.ci-ln-36vygqk-76ef8.origin-ci-int-aws.dev.rhcloud.com/default/busybox:latest: reading manifest latest in default-route-openshift-image-registry.apps.ci-ln-36vygqk-76ef8.origin-ci-int-aws.dev.rhcloud.com/default/busybox: toomanyrequests: unable to pullthrough manifest

redhat@jitli:~/work/src/test$ curl -XPOST -d 'c=1' "http://${REGISTRY}/"
redhat@jitli:~/work/src/test$ oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
config.imageregistry.operator.openshift.io/cluster patched

redhat@jitli:~/work/src/test$ oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}'
default-route-openshift-image-registry.apps.ci-ln-36vygqk-76ef8.origin-ci-int-aws.dev.rhcloud.com


time="2022-05-19T03:58:16.875161328Z" level=error msg="response completed with error" err.code=toomanyrequests err.message="unable to pullthrough manifest" go.version=go1.17.5 http.request.host=default-route-openshift-image-registry.apps.ci-ln-36vygqk-76ef8.origin-ci-int-aws.dev.rhcloud.com http.request.id=3434ba01-92f7-4816-9b54-f4b285fb89ec http.request.method=GET http.request.remoteaddr=66.187.232.129 http.request.uri=/v2/default/busybox/manifests/latest http.request.useragent="containers/5.16.0 (github.com/containers/image)" http.response.contenttype="application/json; charset=utf-8" http.response.duration=4.13086298s http.response.status=429 http.response.written=83 openshift.auth.user="system:serviceaccount:default:builder" vars.name=default/busybox vars.reference=latest

Comment 7 errata-xmlrpc 2022-06-07 13:24:32 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 (OpenShift Container Platform 4.10.17 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/RHBA-2022:4882