Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1452013 - [3.6] instructions about openshift_hosted_routers in ose.example should be updated according to the latest code change.
[3.6] instructions about openshift_hosted_routers in ose.example should be up...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.6.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Steve Milner
Johnny Liu
:
Depends On: 1452012
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-18 03:30 EDT by Johnny Liu
Modified: 2017-08-16 15 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1452012
Environment:
Last Closed: 2017-08-10 01:24:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 05:02:50 EDT

  None (edit)
Description Johnny Liu 2017-05-18 03:30:09 EDT
The same issue happened with 3.6.

Version:
openshift-ansible-playbooks-3.6.65.5-stage.git.0.b41534cNone.noarch


+++ This bug was initially created as a clone of Bug #1452012 +++

Description of problem:
According to openshift-ansible commit 9397727e433cbd9bfd865fb5ad773c7b6b4590e8, "certificates" parameter is renamed to "certificate" for openshift_hosted_routers option, while no update for ose.example accordingly. 
# grep -A 10 -B 17 "certificates:" /usr/share/doc/openshift-ansible-docs-3.5.71/docs/example-inventories/hosts.ose.example
# Router sharding support has been added and can be achieved by supplying the correct
# data to the inventory.  The variable to house the data is openshift_hosted_routers
# and is in the form of a list.  If no data is passed then a default router will be
# created.  There are multiple combinations of router sharding.  The one described
# below supports routers on separate nodes.
#openshift_hosted_routers:
#- name: router1
#  stats_port: 1936
#  ports:
#  - 80:80
#  - 443:443
#  replicas: 1
#  namespace: default
#  serviceaccount: router
#  selector: type=router1
#  images: "openshift3/ose-${component}:${version}"
#  edits: []
#  certificates:
#    certfile: /path/to/certificate/abc.crt
#    keyfile: /path/to/certificate/abc.key
#    cafile: /path/to/certificate/ca.crt
#- name: router2
#  stats_port: 1936
#  ports:
#  - 80:80
#  - 443:443
#  replicas: 1
#  namespace: default
#  serviceaccount: router
#  selector: type=router2
#  images: "openshift3/ose-${component}:${version}"
#  certificates:
#    certfile: /path/to/certificate/xyz.crt
#    keyfile: /path/to/certificate/xyz.key
#    cafile: /path/to/certificate/ca.crt
#  edits:
#  # ROUTE_LABELS sets the router to listen for routes
#  # tagged with the provided values
#  - key: spec.template.spec.containers[0].env
#    value:
#      name: ROUTE_LABELS
#      value: "route=external"


If user follow the doc to deploy router sharding with "certificates" parameter, will encounter the following error:
TASK [openshift_hosted : Create OpenShift router] ******************************
Thursday 18 May 2017  02:54:30 +0000 (0:00:03.967)       0:17:02.739 ********** 
fatal: [ec2-52-87-65-11.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: Unable to look up a name or access an attribute in template string ({{ ('/etc/origin/master/' ~ (item.certificate.cafile | basename)) if 'cafile' in item.certificate else omit }}).
Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable

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

The offending line appears to be:


- name: Create OpenShift router
  ^ here




Version-Release number of selected component (if applicable):
openshift-ansible-3.5.71-1.git.0.128c2db.el7

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Steve Milner 2017-05-19 14:34:20 EDT
PR: https://github.com/openshift/openshift-ansible/pull/4249
Comment 3 Johnny Liu 2017-05-24 04:43:32 EDT
Verified this bug with openshift-ansible-3.6.80-1.git.0.807fc98.el7.noarch, and PASS.

# grep -A 10 -B 17 "certificate:" /usr/share/doc/openshift-ansible-docs-3.6.80/docs/example-inventories/hosts.ose.example
# Router sharding support has been added and can be achieved by supplying the correct
# data to the inventory.  The variable to house the data is openshift_hosted_routers
# and is in the form of a list.  If no data is passed then a default router will be
# created.  There are multiple combinations of router sharding.  The one described
# below supports routers on separate nodes.
#openshift_hosted_routers:
#- name: router1
#  stats_port: 1936
#  ports:
#  - 80:80
#  - 443:443
#  replicas: 1
#  namespace: default
#  serviceaccount: router
#  selector: type=router1
#  images: "openshift3/ose-${component}:${version}"
#  edits: []
#  certificate:
#    certfile: /path/to/certificate/abc.crt
#    keyfile: /path/to/certificate/abc.key
#    cafile: /path/to/certificate/ca.crt
#- name: router2
#  stats_port: 1936
#  ports:
#  - 80:80
#  - 443:443
#  replicas: 1
#  namespace: default
#  serviceaccount: router
#  selector: type=router2
#  images: "openshift3/ose-${component}:${version}"
#  certificate:
#    certfile: /path/to/certificate/xyz.crt
#    keyfile: /path/to/certificate/xyz.key
#    cafile: /path/to/certificate/ca.crt
#  edits:
#  # ROUTE_LABELS sets the router to listen for routes
#  # tagged with the provided values
#  - key: spec.template.spec.containers[0].env
#    value:
#      name: ROUTE_LABELS
#      value: "route=external"
Comment 5 errata-xmlrpc 2017-08-10 01:24:06 EDT
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/RHEA-2017:1716

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