Bug 1712496 - imagestream's referencePolicy field should be set to Source when openshift_hosted_manage_registry is set to false
Summary: imagestream's referencePolicy field should be set to Source when openshift_ho...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.11.z
Assignee: Joseph Callen
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-21 15:50 UTC by Joel Rosental R.
Modified: 2019-07-23 19:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The openshift project's ImageStreams is not modified in the case of a hosted managed registry is false Consequence: The ImageStreams fail if not using hosted managed registry Fix: Read and modify the resulting dictionary to set referencePolicy to source Result: The imagestreams can be used without a hosted managed registry
Clone Of:
Environment:
Last Closed: 2019-07-23 19:56:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1753 0 None None None 2019-07-23 19:56:35 UTC

Description Joel Rosental R. 2019-05-21 15:50:52 UTC
Description of problem:
By default OCP image registry is deployed as well as image pullthrough. However, when "openshift_hosted_manage_registry" is set to false because an external image registry is going to be used instead, then referencePolicy field on imagestream objects should be set to "Source" instead.

Currently when OCP is installed this is not altered, and it has to be modified manually as follows:

oc get is postgresql --export -o yaml -n openshift > is-postgresql.yaml
sed 's/Local/Source/' is-postgresql.yaml > is-postgresql-modified.yaml
oc delete is postgresql -n openshift
oc create -f is-postgresql-modified.yaml -n openshift


Version-Release number of the following components:
$ rpm -q openshift-ansible
openshift-ansible-3.11.92-1.git.0.f2fade7.el7.noarch

$ ansible-2.6.15-1.el7ae.noarch
rpm -q ansible

$ ansible --version
ansible 2.6.15

How reproducible:
Always

Steps to Reproduce:
1. Set openshift_hosted_manage_registry=false in the ansible inventory file
2. Install OCP


Actual results:
referencePolicy field on imagestream objects definition is set to "Local" instead of "Source"

Expected results:
It should be set to "Source" instead.

Additional info:

Comment 1 Joseph Callen 2019-05-31 19:31:40 UTC
PR: https://github.com/openshift/openshift-ansible/pull/11653

Comment 3 Gaoyun Pei 2019-07-11 10:03:59 UTC
Verify this bug with openshift-ansible-3.11.129-1.git.0.11838de.el7.noarch.rpm,
when openshift_hosted_manage_registry=false set in ansible inventory file, referencePolicy field is set to "Source"
[root@ip-172-18-9-149 ~]# oc get is postgresql --export -o yaml -n openshift |grep referencePolicy -A 1
    referencePolicy:
      type: Source
--
    referencePolicy:
      type: Source
--
    referencePolicy:
      type: Source
--
    referencePolicy:
      type: Source
--
    referencePolicy:
      type: Source
--
    referencePolicy:
      type: Source

In previous openshift-ansible installer - openshift-ansible-3.11.107-1.git.0.c5a8069.el7.noarch.rpm, it was like:
[root@ip-172-18-3-101 ~]# oc get is postgresql --export -o yaml -n openshift |grep referencePolicy -A 1
    referencePolicy:
      type: Local
--
    referencePolicy:
      type: Local
--
    referencePolicy:
      type: Local
--
    referencePolicy:
      type: Local
--
    referencePolicy:
      type: Local
--
    referencePolicy:
      type: Local

Comment 5 errata-xmlrpc 2019-07-23 19:56:23 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-2019:1753


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