Bug 1506267

Summary: OpenShift ansible installer fails using disconnected install
Product: OpenShift Container Platform Reporter: davis phillips <dphillip>
Component: InstallerAssignee: Luke Meyer <lmeyer>
Status: CLOSED NOTABUG QA Contact: Johnny Liu <jialiu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.1CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.9.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: 2018-01-12 20:41:25 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 davis phillips 2017-10-25 14:06:45 UTC
Description of problem:

Version-Release number of the following components:
rpm -q openshift-ansible
openshift-ansible-3.6.173.0.21-2.git.0.44a4038.el7.noarch

rpm -q ansible
ansible-2.3.2.0-2.el7.noarch

ansible --version
ansible 2.3.2.0
  config file = /root/git/openshift-ansible-contrib/reference-architecture/vmware-ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

How reproducible:
Everytime

Steps to Reproduce:
1. Prep a disconnected installation - 
2. Pass oreg_url and openshift_docker_additional_registries to your install vars
3. Always fails because it appends the registry name again to the image name space

Requires openshift_disable_check: "docker_image_availability" to complete installation 

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

  1. Host:     master-0
     Play:     Verify Requirements
     Task:     openshift_health_check
     Message:  One or more checks failed
     Details:  check "docker_image_availability":
               One or more required Docker images are not available:
                   sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_deployer:v3.6.173.0.21,
                   sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_docker-registry:v3.6.173.0.21,
                   sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_haproxy-router:v3.6.173.0.21,
                   sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_pod:v3.6.173.0.21
               Configured registries: registry.access.redhat.com


Expected results:
Cluster installed.

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 2 Luke Meyer 2018-01-12 20:41:25 UTC
If you include the registry explicitly in oreg_url then it will be included in the image names that openshift attempts to deploy. The check attempts to mimic runtime behavior so it does the same in forming the names of the images it tests.

As your output is saying that images like "sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_deployer:v3.6.173.0.21" are missing I would guess that your oreg_url is including the registry, something like:
oreg_url=sat6.e2e.bos.redhat.com:5000/default_organization-ocp3_disconnected-openshift3_${component}:${version}

In which case, the behavior is correct. If you wanted to allow the image to source from any registry it should look more like:
oreg_url=default_organization-ocp3_disconnected-openshift3_${component}:${version}

There have been a lot of changes to this code during and since 3.6, so I could easily be mistaken about how well this specific version works as expected. Please feel free to re-open this if it does not appear to be operating as I said.