Bug 1291242 - To be able to pull image from openshift registry using service name [NEEDINFO]
To be able to pull image from openshift registry using service name
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michal Fojtik
zhou ying
Depends On:
  Show dependency treegraph
Reported: 2015-12-14 06:55 EST by Miheer Salunke
Modified: 2017-03-08 13 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-01-18 07:38:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
misalunk: needinfo? (miminar)

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description Miheer Salunke 2015-12-14 06:55:10 EST
1. Proposed title of this feature request  
  To be able to pull image from openshift registry using registry's service name
2. Who is the customer behind the request?  
Account: name AXA Technology Services SAS
TAM customer: yes 
SRM customer: no idea  
Strategic: yes  
3. What is the nature and description of the request?  

docker pull using IP:port "" succeeds
This works, but to have the IP there is no good idea. First I want to create templates that we can use in different OpenShift environments and also in the same environment, the IP could change. The skydns name of the docker-registry should be used, which is the same in all environments. I tested with:

- "image": "test-build/test-cq:latest" (no IP at all)
Result: Failed to pull image "test-build/test-cq:latest": Error: image test-build/test-cq:latest not found
- "image": "docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest"
Result: Failed to pull image "docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest": image pull failed for docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest, this may be because there are no credentials on this request.  details: (API error (500): invalid registry endpoint https://docker-registry.default.svc.cluster.local:5000/v0/: unable to ping registry endpoint https://docker-registry.default.svc.cluster.local:5000/v0/
v2 ping attempt failed with error: Get https://docker-registry.default.svc.cluster.local:5000/v2/: Forbidden
 v1 ping attempt failed with error: Get https://docker-registry.default.svc.cluster.local:5000/v1/_ping: Forbidden. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry docker-registry.default.svc.cluster.local:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/docker-registry.default.svc.cluster.local:5000/ca.crt

4. Why does the customer need this? (List the business requirements here)  

It's kind of annoying to use the IP address, because:
- We have 4 environments, so a different IP for docker registry in each environment. We are using templates to create objects (is, bc, dc, ...). So we need to do additional effort to parameterize the docker registry IP.
- With every update of OpenShift (3.0.1 to 3.0.2, 3.0.2 to 3.1.0) or sometimes also after fixing problems by RedHat, the docker registry IP changes and existing objects (dc) need to be updated with the changed IP, which also needs additional effort.

5. How would the customer like to achieve this? (List the functional requirements here)  

Not given.
6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  

We will check by pulling image from openshift registry using it's service name
7. Is there already an existing RFE upstream or in Red Hat Bugzilla?  

8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?  

Not specified. 
9. Is the sales team involved in this request and do they have any additional input?  

No  idea

10. List any affected packages or components.  

Registry, Docker registry
11. Would the customer be able to assist in testing this functionality if implemented? 

Comment 1 Dan McPherson 2016-04-13 09:18:13 EDT
This sounds like you wan to expose the registry through a route:


Does that solve the problem?
Comment 3 Michal Minar 2016-05-18 02:07:23 EDT
Related issue: https://github.com/openshift/origin/issues/8581
Comment 4 Michal Minar 2016-11-21 05:59:37 EST
The referenced issues has been resolved.

@miheer can you confirm that way this is resolved as mentioned in comment [1] is sufficient? You should be able to pull and push using docker-registry service name (e.g. registry.default.svc:5000/develop/simple-ruby:latest). Nevertheless, resulting image in image stream will be still tagged with service IP.

[1] https://github.com/openshift/origin/issues/8581#issuecomment-239880317
Comment 5 zhou ying 2016-11-22 20:47:29 EST
Confirmed with OCP3.4, we can reference unsecure registry with stable name:
[root@zhouy testjson]# oc get is
NAME              DOCKER REPO                                               TAGS      UPDATED
ruby-22-centos7   docker-registry.default.svc:5000/zytest/ruby-22-centos7   latest    Less than a second ago
ruby-ex           docker-registry.default.svc:5000/zytest/ruby-ex
Comment 6 Michal Minar 2016-11-23 02:53:24 EST
Comment 10 errata-xmlrpc 2017-01-18 07:38:47 EST
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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.