Bug 1403355 - oreg_url and openshift_examples_modify_imagestreams do not appear to have modified the imagestreams
Summary: oreg_url and openshift_examples_modify_imagestreams do not appear to have mod...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.3.1
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 3.3.1
Assignee: Russell Teague
QA Contact: Wenkai Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-09 19:28 UTC by Eric Jones
Modified: 2017-02-08 07:23 UTC (History)
7 users (show)

Fixed In Version: openshift-ansible-3.3.61-1
Doc Type: Enhancement
Doc Text:
The openshift-ansible advanced install method now alters the Registry Console's IMAGE_PREFIX value to match the oreg_url prefix when openshift_examples_modify_imagestreams=true allowing users to install from a registry other than registry.access.redhat.com.
Clone Of:
Environment:
Last Closed: 2017-02-06 13:55:55 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Eric Jones 2016-12-09 19:28:54 UTC
Description of problem:
After specifying oreg_url and openshift_examples_modify_imagestreams in the inventory file the installer was run and it failed when the registry-console deployer pod failed because it tried to pull from registry.access.redhat.com instead of the registry specified by oreg_url. 

Additional info:
Attaching ansible logs and inventory file shortly

Comment 2 Peter Larsen 2016-12-09 20:02:18 UTC
I'm setting the same thing atomic-openshift-3.3.1.7-1

Comment 3 Eric Jones 2016-12-09 22:19:10 UTC
I had the customer run `rpm -qa | grep -ie openshift -ie ocp -ie ose -ie ansible` and this is the output:

openshift-ansible-roles-3.3.54-1.git.0.61a1dee.el7.noarch
openshift-ansible-filter-plugins-3.3.54-1.git.0.61a1dee.el7.noarch
atomic-openshift-master-3.3.1.5-1.git.0.62700af.el7.x86_64
atomic-openshift-node-3.3.1.5-1.git.0.62700af.el7.x86_64
ansible-2.2.0.0-1.el7.noarch
openshift-ansible-lookup-plugins-3.3.54-1.git.0.61a1dee.el7.noarch
atomic-openshift-utils-3.3.54-1.git.0.61a1dee.el7.noarch
openshift-ansible-docs-3.3.54-1.git.0.61a1dee.el7.noarch
openshift-ansible-callback-plugins-3.3.54-1.git.0.61a1dee.el7.noarch
atomic-openshift-clients-3.3.1.5-1.git.0.62700af.el7.x86_64
procps-ng-3.3.10-5.el7_2.x86_64
atomic-openshift-sdn-ovs-3.3.1.5-1.git.0.62700af.el7.x86_64
openshift-ansible-3.3.54-1.git.0.61a1dee.el7.noarch
atomic-openshift-3.3.1.5-1.git.0.62700af.el7.x86_64
tuned-profiles-atomic-openshift-node-3.3.1.5-1.git.0.62700af.el7.x86_64
openshift-ansible-playbooks-3.3.54-1.git.0.61a1dee.el7.noarch

Comment 4 Peter Larsen 2016-12-11 03:17:41 UTC
Is the expected functionality to replace both openshift/ and rhscl/ repositories with that of oreg_url ?

Comment 5 Eric Jones 2017-01-05 22:52:58 UTC
@Scott So I went looking into this deeper and started digging into the ansible playbooks.

I found the default setting for the registry_url and registry_host variables [0] which are the variables used to see if ansible should replace the registry.access.redhat.com (as seen in [1]).

The example inventory file includes a block about using the oreg_url to set change the registry url [2] and I did find where it changes the registry_url [3] but I couldn't find if this is then used later to set the registry_host variable after the default. 

Could this be part of the problem?

[0] https://github.com/openshift/openshift-ansible/blob/6796a7b5bcfe391bf4affaf17c8b9a05a82be58f/roles/openshift_hosted_templates/defaults/main.yml#L7-L8

[1] https://github.com/openshift/openshift-ansible/blob/0eaa3699e7754d38b9f2b8b06d746b1cb61bc6ce/roles/openshift_hosted_templates/tasks/main.yml#L32-L35

[2] https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.ose.example#L92-L96

[3] https://github.com/openshift/openshift-ansible/blob/09b3183997a65c2835a95cf8c38c28e3f20380a7/roles/openshift_node/tasks/main.yml#L25

Comment 6 Wenkai Shi 2017-01-10 08:56:21 UTC
I can reproduce it with version openshift-ansible-3.3.57-1.git.0.f275588.el7.noarch. And it has been fixed in 3.4 because of BZ#1384772.

Comment 7 Russell Teague 2017-01-24 20:33:48 UTC
@sdodson Does the fix in this PR (https://github.com/openshift/openshift-ansible/pull/2573) need to be back ported to 3.3?  Given that the issue was fixed in 3.4 with this PR, and the target release for this issue is 3.5 I was unsure if we needed to backport or just close this as fixed.

Comment 8 Scott Dodson 2017-01-24 20:45:58 UTC
If we can verify that it's not a problem in 3.5 currently lets reset target version to 3.3.1 and fix it there. I'm not certain if that PR alone is sufficient to fix the problem or not.

Comment 9 Russell Teague 2017-02-03 18:11:19 UTC
Changes for this fix have been confirmed backported to release 3.3.

Comment 10 Wenkai Shi 2017-02-06 05:24:28 UTC
Verified with version openshift-ansible-3.3.61-1, setting oreg_url and openshift_examples_modify_imagestreams in the inventory file, installation succeed.

[root@ansible ~]# cat hosts
...
oreg_url=registry.ops.openshift.com/openshift3/ose-${component}:${version}
openshift_examples_modify_imagestreams=true
...

[root@openshift ~]# oc get pods | grep "registry-console"
registry-console-1-erbs0   1/1       Running   0          1h

[root@openshift ~]# oc get dc registry-console -o yaml | grep "image:"
        image: registry.ops.openshift.com/openshift3/registry-console:3.3


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