| Summary: | Set imagePolicyConfig in installer | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Stefanie Forrester <dakini> |
| Component: | Installer | Assignee: | Devan Goodwin <dgoodwin> |
| Status: | CLOSED ERRATA | QA Contact: | Ma xiaoqiang <xiama> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.2.0 | CC: | aos-bugs, dakini, dgoodwin, gpei, jialiu, jokerman, mmccomas, tdawson, xtian |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-12 16:40:24 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: | |
|
Description
Stefanie Forrester
2016-04-07 13:28:01 UTC
This bug had failures and did not merge. Moving back to assigned. Please move it back to Modified when the pull request has merged. Should be in atomic-openshift-3.2.0.17-1.git.0.c1a604e.el7, which is built and ready for qe testing. 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.
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
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. 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.
I was using commit id 87f839179c7, April 21st. I'll try again with the latest. Follow up fix for first run on a system: https://github.com/openshift/openshift-ansible/pull/1818 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 |