Bug 1467252 - [3.6] haproxy lb containerized install failed due to 'openshift_image_tag' is undefined
Summary: [3.6] haproxy lb containerized install failed due to 'openshift_image_tag' is...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.6.z
Assignee: Andrew Butcher
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-03 09:01 UTC by Johnny Liu
Modified: 2017-09-05 17:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The containerized load balancer did not properly use openshift_image_tag and this error has been corrected ensuring proper containerized installation of API load balancer host.
Clone Of:
Environment:
Last Closed: 2017-09-05 17:42:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2639 0 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix and enhancement 2017-09-05 21:42:36 UTC

Description Johnny Liu 2017-07-03 09:01:14 UTC
Description of problem:
In roles/openshift_version/tasks/main.yml:
<--snip-->
- when:
  - inventory_hostname in groups['oo_masters_to_config'] or inventory_hostname in groups['oo_nodes_to_config']
  block:
  - name: Set openshift_version for rpm installation
    include: set_version_rpm.yml
    when: not is_containerized | bool

  - name: Set openshift_version for containerized installation
    include: set_version_containerized.yml
    when: is_containerized | bool
<--snip-->

"inventory_hostname in groups['oo_masters_to_config'] or inventory_hostname in groups['oo_nodes_to_config']" does not take haproxy lb into consideration, that would lead to set_version_containerized.yml will be skipped on lb host. That would lead to 'openshift_image_tag' is not defined, which would lead to fail to pull haproxy docker pull image.

Version-Release number of selected component (if applicable):
openshift-ansible-3.6.131-1.git.0.d87dfaa.el7.noarch

How reproducible:
Awlays

Steps to Reproduce:
1. Prepare an inventory host file for a containerized isntall, define a lb host in the inventory host file.
2. Trigger installation.
3.

Actual results:
Job failed at the following task:
<--snip-->
TASK [openshift_loadbalancer : Pull haproxy image] *****************************
Monday 03 July 2017  07:40:30 +0000 (0:00:00.104)       0:17:48.371 *********** 
fatal: [xxx.compute-1.amazonaws.com]: FAILED! => {
    "failed": true
}

MSG:

the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'openshift_image_tag' is undefined

The error appears to have been in '/home/slave3/workspace/Launch Environment Flexy/private-openshift-ansible/roles/openshift_loadbalancer/tasks/main.yml': line 6, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Pull haproxy image
  ^ here
<--snip-->


Expected results:
LB containerize install should be completed successfully.

Additional info:

Comment 5 Gaoyun Pei 2017-08-23 03:32:35 UTC
Verify this bug with openshift-ansible-3.6.173.0.7-2.git.0.340aa2c.el7.noarch.rpm

With a lb host defined in ansible inventory for a containerized install on AH, and without openshift_image_tag specified, installer could pull the correct image.

TASK [openshift_loadbalancer : Pull haproxy image] *****************************
Wednesday 23 August 2017  02:29:53 +0000 (0:00:00.018)       0:04:58.572 ****** 
changed: [qe-gpei-phct-lb-1.0823-7c0.qe.rhcloud.com] => {
    "changed": true, 
    "cmd": [
        "docker", 
        "pull", 
        "openshift3/ose-haproxy-router:v3.6.173.0.7"
    ], 
    "delta": "0:00:41.331715", 
    "end": "2017-08-23 02:30:35.165633", 
    "rc": 0, 
    "start": "2017-08-23 02:29:53.833918"
}

STDOUT:
...


On lb host, haproxy container is running well.
[root@qe-gpei-phct-lb-1 ~]# docker ps
CONTAINER ID        IMAGE                                        COMMAND                  CREATED             STATUS              PORTS                                             NAMES
b52239389f9e        openshift3/ose-haproxy-router:v3.6.173.0.7   "haproxy -f /etc/hapr"   57 minutes ago      Up 57 minutes       53/tcp, 80/tcp, 443/tcp, 0.0.0.0:8443->8443/tcp   openshift_loadbalancer

Comment 7 errata-xmlrpc 2017-09-05 17:42:58 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-2017:2639


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