Bug 1324877 - Set imagePolicyConfig in installer
Summary: Set imagePolicyConfig in installer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Devan Goodwin
QA Contact: Ma xiaoqiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-07 13:28 UTC by Stefanie Forrester
Modified: 2017-05-22 09:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 16:40:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1065 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-05-12 20:32:56 UTC

Description Stefanie Forrester 2016-04-07 13:28:01 UTC
Description of problem:

For OpenShift Online, we'll need the option to set imagePolicyConfig at install time. Related issue: https://github.com/openshift/online/issues/79

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Troy Dawson 2016-04-11 15:55:03 UTC
This bug had failures and did not merge.

Comment 3 Troy Dawson 2016-04-13 16:25:06 UTC
Moving back to assigned.  Please move it back to Modified when the pull request has merged.

Comment 4 Troy Dawson 2016-04-18 16:02:29 UTC
Should be in atomic-openshift-3.2.0.17-1.git.0.c1a604e.el7, which is built and ready for qe testing.

Comment 5 Ma xiaoqiang 2016-04-19 06:09:12 UTC
Check the installation on openshift-ansible-3.0.80-1

scenario 1
Install env without openshift_master_image_policy_config, check the master configuration after installing

<--snip-->
imageConfig:
  format: virt-openshift-05.lab.eng.nay.redhat.com:5000/openshift3/ose-${component}:${version}
  latest: false
kind: MasterConfig
<--snip-->


scenario 2
Install env with  openshift_master_image_policy_config
openshift_master_image_policy_config={"MaxImagesBulkImportedPerRepository": 3, "DisableScheduledImport": False, "ScheduledImageImportMinimumIntervalSeconds": 30, "MaxScheduledImageImportsPerMinute": 20}

check configuration after installation
<--snip-->
imageConfig:
  format: virt-openshift-05.lab.eng.nay.redhat.com:5000/openshift3/ose-${component}:${version}
  latest: false
imagePolicyConfig:
  DisableScheduledImport: false
  MaxImagesBulkImportedPerRepository: 3
  MaxScheduledImageImportsPerMinute: 20
  ScheduledImageImportMinimumIntervalSeconds: 30
kind: MasterConfig
<--snip-->
the specified parameter take effect, move this issue to VERIFIED.

Comment 6 Stefanie Forrester 2016-04-25 21:22:42 UTC
I'm attempting to use this new feature by specifying the following in my inventory file:

openshift_master_image_policy_config={"maxImagesBulkImportedPerRepository": 3, "disableScheduledImport": true}

But during installation, restarting master-api fails because of the syntax error. When I open up master-config.yaml, it shows this:

imagePolicyConfig:
  '{"maxImagesBulkImportedPerRepository": 3, "disableScheduledImport": true}'

I'm running the latest version of openshift, atomic-openshift-master-3.2.0.19-1.git.0.929bb12.el7.x86_64

Comment 7 Devan Goodwin 2016-04-26 12:00:19 UTC
What version of openshift ansible were you running? I swear I've fixed this twice now but it keeps coming back. It should be fixed as of: openshift-ansible-3.0.82-1 or roughly Apr 20th.

Comment 8 Devan Goodwin 2016-04-26 13:42:29 UTC
Using latest openshift-ansible master, using the same inventory line my master config comes out with:

imagePolicyConfig:
  disableScheduledImport: true
  maxImagesBulkImportedPerRepository: 3

This fix is in the openshift_facts.py module and thus, like the last time, it could be influenced by an older version of the rpm being installed when trying to use latest git checkout, or similar. Critically you should see code like this in the python module that is used:

                # Watchout for JSON facts that sometimes load as strings.
                # (can happen if the JSON contains a boolean)
                if isinstance(new[key], basestring):
                    facts[key] = yaml.safe_load(new[key])

The basestring is the fix, previously this was just str.

Comment 9 Stefanie Forrester 2016-04-26 14:27:17 UTC
I was using commit id 87f839179c7, April 21st. I'll try again with the latest.

Comment 10 Devan Goodwin 2016-04-27 15:36:45 UTC
Follow up fix for first run on a system: https://github.com/openshift/openshift-ansible/pull/1818

Comment 12 errata-xmlrpc 2016-05-12 16:40:24 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-2016:1065


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