Bug 1583577

Summary: Cannot pull the correct image when using the partner_rhcc adapter
Product: OpenShift Container Platform Reporter: Jian Zhang <jiazha>
Component: Service BrokerAssignee: Dylan Murray <dymurray>
Status: CLOSED ERRATA QA Contact: Jian Zhang <jiazha>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, chezhang, dymurray, zhsun, zitang
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:16:51 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 Jian Zhang 2018-05-29 09:45:23 UTC
Description of problem:
Cannot pull the correct image if the registry contains a port. 
The correct image name should be "registry.reg-aws.openshift.com:443/openshift3/postgresql-apb:v3.10", not "registry.reg-aws.openshift.com/openshift3/postgresql-apb:v3.10" when the registry URL is "https://registry.reg-aws.openshift.com:443".

Version-Release number of selected component (if applicable):
The ASB version: 1.2.14

How reproducible:
always

Steps to Reproduce:
1. Config the partner_rhcc adapter as below:
  - type: partner_rhcc
    name: aws
    url:  https://registry.reg-aws.openshift.com:443
    user: xxx     
    pass: xxx
    tag:  v3.10
    images:
      - openshift3/mediawiki-apb
      - openshift3/postgresql-apb
      - openshift3/mariadb-apb
      - openshift3/mysql-apb
    white_list: [.*-apb$]

2. Provision an APB, such as PostgreSQL.

Actual results:
Pull image error:
  Warning  Failed          38s                kubelet, qe-jiazha-29node-registry-router-1  Failed to pull image "registry.reg-aws.openshift.com/openshift3/postgresql-apb:v3.10": rpc error: code = Unknown desc = Error: image openshift3/postgresql-apb:v3.10 not found

Expected results:
Provision APB success. The image name should be "registry.reg-aws.openshift.com:443/openshift3/postgresql-apb:v3.10"

Additional info:

Comment 1 Jian Zhang 2018-05-29 09:54:15 UTC
I submit a PR(https://github.com/automationbroker/bundle-lib/pull/96) to fix this, looking forward your comments.

Comment 3 Jian Zhang 2018-05-31 05:53:29 UTC
Change status to MODIFIED since the image is NOT ready.

Comment 4 David Zager 2018-06-01 19:30:05 UTC
openshift-enterprise-asb-container-v3.10.0-0.54.0.1 should be available now.

Comment 5 David Zager 2018-06-01 19:32:55 UTC
$ docker inspect registry.access.stage.redhat.com/openshift3/ose-ansible-service-broker:v3.10.0 --format "{{ index .Config.Labels.release }}"
0.54.0.1

Comment 6 Jian Zhang 2018-06-04 08:22:09 UTC
Sorry, my mistake, it's ready.  Thanks @David

Verify success.
ASB version: 1.2.16

[root@qe-jiazha-o4master-etcd-1 ~]# oc describe pods -n pr-mariadb-apb-prov-p9rgp| grep image
  Normal  Pulling    11m   kubelet, qe-jiazha-o4node-registry-router-1  pulling image "registry.reg-aws.openshift.com:443/openshift3/mariadb-apb:v3.10"

# oc get pods -n pr-mariadb-apb-prov-p9rgp
NAME                                       READY     STATUS      RESTARTS   AGE
apb-501de8aa-8912-4ea9-aaaa-1436fb2cd0bc   0/1       Completed   0          13m

Provision APB success.
# oc get pods -n jian
NAME                                                      READY     STATUS    RESTARTS   AGE
mariadb-45bd4502-67ce-11e8-ab15-0a580a800003-1-692q8      1/1       Running   0          1m

Comment 8 errata-xmlrpc 2018-07-30 19:16:51 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, 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-2018:1816