Bug 1497310 - Registry-console image check states to use registry.access.redhat.com
Summary: Registry-console image check states to use registry.access.redhat.com
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 3.7.0
Assignee: Luke Meyer
QA Contact: Wenkai Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-29 17:42 UTC by Eric Jones
Modified: 2017-11-28 22:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-11-28 22:13:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Eric Jones 2017-09-29 17:42:49 UTC
Description of problem:
The openshift health check docker image availability playbook [0] only checks the registry.access.redhat.com registry even if the customer is using a local registry instead.

[0] https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_health_checker/openshift_checks/docker_image_availability.py

Version-Release number of selected component (if applicable):
3.6

Comment 1 Luke Meyer 2017-10-06 18:36:52 UTC
That's because the installer uses a template to deploy registry-console, and that template puts registry.access.redhat.com in the image name unless you pass the obscure openshift_cockpit_deployer_prefix option to the installer to override it.

See https://github.com/openshift/openshift-ansible/blob/707be43d8ed091612ae1cf7e0f44a3b5598d402a/inventory/byo/hosts.example#L398 for a description of the only current way to override that image registry.

The template: https://github.com/openshift/openshift-ansible/blob/707be43d8ed091612ae1cf7e0f44a3b5598d402a/roles/openshift_hosted_templates/files/v3.7/enterprise/registry-console.yaml#L30
Where it's used: https://github.com/openshift/openshift-ansible/blob/707be43d8ed091612ae1cf7e0f44a3b5598d402a/roles/cockpit-ui/tasks/main.yml#L44

There are a whole lot of other ansible variables that can affect where images come from, but AFAIK that is the only one for registry-console, so make sure that's what you mean by "using a local registry".

It is true that docker_image_availability does not consult this variable; I was actually not aware of it until just now. So this is a valid bug, but the scope is just to follow that variable if supplied, at least until there is a more general way to customize image usage in the installer. Otherwise, the check is correct that this image will be required.

Comment 2 Luke Meyer 2017-10-24 12:34:06 UTC
https://github.com/openshift/openshift-ansible/pull/5829 against master

Comment 3 openshift-github-bot 2017-11-08 20:14:37 UTC
Commit pushed to master at https://github.com/openshift/openshift-ansible

https://github.com/openshift/openshift-ansible/commit/37812f0da8f72df9108bfdcd882439d3faeea79b
reconcile registry-console and docker_image_availability

Fixes bug 1497310
https://bugzilla.redhat.com/show_bug.cgi?id=1497310

The registry console is a special case in more than one way. This adds
logic to incorporate the openshift_cockpit_deployer_* variables into
determining what its image will be in docker_image_availability.

Along the way I noticed the origin and enterprise templates for this
were not consistent. Now they are, and the example hosts file is updated.

Comment 5 Wenkai Shi 2017-11-09 09:22:19 UTC
Verified with version openshift-ansible-3.7.4-1.git.0.254e849.el7.

On [1], set openshift_cockpit_deployer_prefix=registry.example.com/myrepo/ in inventory file, run docker_image_availability playbook, it failed.
On [2], set openshift_cockpit_deployer_prefix with a custom correctly value, docker_image_availability playbook succeed.

So the variable has effect~ 

[1]
# ansible-playbook -i inventory -vv /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-checks/adhoc.yml -e openshift_checks=docker_image_availability
...
     Details:  check "docker_image_availability":
               One or more required container images are not available:
                   registry.example.com/myrepo/registry-console:v3.7
...
[2]
# ansible-playbook -i inventory -vv /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-checks/adhoc.yml -e openshift_checks=docker_image_availability
...
Initialization             : Complete

Comment 8 errata-xmlrpc 2017-11-28 22:13:46 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


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