Bug 1496391

Summary: Pull image failed due to installer comment "registry.access.redhat.com"
Product: OpenShift Container Platform Reporter: Wenkai Shi <weshi>
Component: InstallerAssignee: Michael Gugino <mgugino>
Status: CLOSED ERRATA QA Contact: Wenkai Shi <weshi>
Severity: high Docs Contact:
Priority: high    
Version: 3.7.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.7.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: 2017-11-28 22:13:02 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 Wenkai Shi 2017-09-27 09:20:53 UTC
Description of problem:
Install OCP & CNS, the rhgs3/rhgs-server-rhel7 image is needed, which is from "registry.access.redhat.com". Installation failed due to the registry has been comment by installer.

Version-Release number of the following components:
openshift-ansible-3.7.0-0.128.0.git.0.89dcad2.el7
ansible-2.3.2.0-2.el7

How reproducible:
100%

Steps to Reproduce:
1. Install OCP & CNS
2.
3.

Actual results:
--------------------
Installation failed:
--------------------
ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml
...
TASK [openshift_storage_glusterfs : Wait for GlusterFS pods] *******************
Wednesday 27 September 2017  08:11:18 +0000 (0:00:02.480)       0:12:15.248 *** 
FAILED - RETRYING: Wait for GlusterFS pods (30 retries left).
...
FAILED - RETRYING: Wait for GlusterFS pods (1 retries left).
fatal: [master.example.com]: FAILED! =>
...
----------------
Inside the node:
----------------
# ssh root.com
# docker pull rhgs3/rhgs-server-rhel7
Using default tag: latest
Trying to pull repository registry.example.com/rhgs3/rhgs-server-rhel7 ... 
Trying to pull repository docker.io/rhgs3/rhgs-server-rhel7 ... 
unauthorized: authentication required
# cat /etc/containers/registries.conf
...
#registries:
#  - registry.access.redhat.com

registries:
  - registry.example.com
...
------------------
According to code:
------------------
# cat roles/docker/templates/registries.conf
...
#registries:
#  - registry.access.redhat.com

{% if l2_docker_additional_registries %}
registries:
{% for reg in l2_docker_additional_registries %}
  - {{ reg }}
{% endfor %}
{% endif %}
...

Expected results:
Installer should keep "registry.access.redhat.com", then could pull image from it.

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

Comment 1 Michael Gugino 2017-09-27 18:36:23 UTC
A PR has been submitted against master branch to fix this issue: https://github.com/openshift/openshift-ansible/pull/5559

Comment 2 Wenkai Shi 2017-10-09 09:22:25 UTC
Verified with version openshift-ansible-3.7.0-0.143.1.git.0.89248df.el7, registry.access.redhat.com has been added as one of the default registries.

# cat /etc/containers/registries.conf
...
registries:
...
  - registry.access.redhat.com
...

# cat /etc/sysconfig/docker
...
ADD_REGISTRY='--add-registry ... --add-registry registry.access.redhat.com'
...

Comment 6 errata-xmlrpc 2017-11-28 22:13:02 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/RHSA-2017:3188