Bug 1476814

Summary: openshift-enterprise.yml is hardcoded to reference registry.access.redhat.com
Product: OpenShift Container Platform Reporter: emahoney
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED CURRENTRELEASE QA Contact: Johnny Liu <jialiu>
Severity: low Docs Contact:
Priority: medium    
Version: 3.5.1CC: aos-bugs, emahoney, erich, jokerman, mmccomas, myllynen
Target Milestone: ---   
Target Release: 3.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-09 15:54:54 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:
Embargoed:

Description emahoney 2017-07-31 14:14:23 UTC
Description of problem:
Receive the following error when deploying an offline environment. 

[1] TASK [openshift_metrics : generate htpasswd file for hawkular metrics] *********
fatal: [testocp12mst1l.example.com]: FAILED! => {
    "changed": true,
    "cmd": "docker run -i -a STDIN -a STDOUT -v \"/tmp/openshift-metrics-ansible-VB64dW\" \"registry.access.redhat.com/rhscl/httpd-24-rhel7\" htpasswd -ni hawkular > '/tmp/openshift-metrics-ansible-VB64dW/hawkular-metrics.htpasswd' < '/tmp/openshift-metrics-ansible-VB64dW/hawkular-metrics.pwd'",
    "delta": "0:00:45.024288",
    "end": "2017-07-25 15:52:47.558694",
    "failed": true,
    "rc": 125,
    "start": "2017-07-25 15:52:02.534406",
    "warnings": []
}


These properties are set in the inventory:

openshift_hosted_metrics_deployer_prefix=redhat-docker.repo.example.com.com/openshift3/
openshift_hosted_metrics_deploy=true


/usr/share/ansible/openshift-ansible/roles/openshift_metrics/vars/openshift-enterprise.yml looks like this:
---
__openshift_metrics_image_prefix: "{{ openshift_hosted_metrics_deployer_prefix | default('registry.access.redhat.com/openshift3/') }}"
__openshift_metrics_image_version: "{{ openshift_hosted_metrics_deployer_version | default ('3.5.0') }}"
__openshift_metrics_httpd_image: "registry.access.redhat.com/rhscl/httpd-24-rhel7"


So the openshift_metrics_httpd_image file is hardcoded to point to registry.access.redhat.com. Can we get a property to set the override for this value?

Was able to modify this value to get around this issue. 

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

How reproducible:
N/a for now

Steps to Reproduce:
1.
2.
3.

Actual results:
Receive error [1]

Expected results:
Play completes successfully. 

Additional info:


Description of problem:

Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Scott Dodson 2017-07-31 15:42:19 UTC
Would this work for you or would you like a new variable just to set this one image?

__openshift_metrics_httpd_image: "{{ __openshift_metrics_image_prefix | split('/')[0] }}/rhscl/httpd-24-rhel7"

Comment 2 emahoney 2017-07-31 15:51:25 UTC
That appears to work for me. I will test later today and remove the NEEDINFO.

-mahoney

Comment 3 emahoney 2017-08-02 14:48:40 UTC
That line worked for me.

-mahoney

Comment 4 Scott Dodson 2017-08-09 15:54:54 UTC
The playbooks were actually amended to not depend on this image starting in openshift-ansible-3.5.71-1.git.0.128c2db.el7