Bug 1583078 - Fail to upgrade ocp with tsb deployed at task [template_service_broker : Apply template file] due to undefined l_os_registry_url
Summary: Fail to upgrade ocp with tsb deployed at task [template_service_broker : Appl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.10.0
Assignee: Russell Teague
QA Contact: liujia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-28 08:09 UTC by liujia
Modified: 2018-07-30 19:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Defaults are defined in the openshift_facts role which was not in scope for the TSB role. Added openshift_facts to the TSB role dependencies.
Clone Of:
Environment:
Last Closed: 2018-07-30 19:16:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:16:38 UTC

Description liujia 2018-05-28 08:09:09 UTC
Description of problem:
Fail to upgrade ocp with tsb deployed at task [template_service_broker : Apply template file].

TASK [template_service_broker : Apply template file] ***************************
task path: /usr/share/ansible/openshift-ansible/roles/template_service_broker/tasks/deploy.yml:36
Monday 28 May 2018  06:56:28 +0000 (0:00:01.733)       0:24:39.348 ************ 
fatal: [x.x.x.x]: FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: {{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'template-service-broker') }}: 'l_os_registry_url' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/template_service_broker/tasks/deploy.yml': line 36, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Apply template file\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: {{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'template-service-broker') }}: 'l_os_registry_url' is undefined"}


# grep -r "l_os_registry_url"
roles/container_runtime/defaults/main.yml:pause_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'pod') }}"
roles/openshift_facts/defaults/main.yml:l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
...
roles/template_service_broker/defaults/main.yml:template_service_broker_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'template-service-broker') }}"

From upgrade log, did not catch in which task l_os_registry_url was define/set facts.


Version-Release number of the following components:
ansible-2.4.4.0-1.el7ae.noarch
openshift-ansible-3.10.0-0.53.0.git.0.53fe016.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Install ocp v3.9 with service_catalog(tsb/asb) deploy
2. Upgrade above ocp to v3.10
3.

Actual results:
Upgrade failed.

Expected results:
Upgrade succeed.

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

Comment 3 Russell Teague 2018-05-30 14:39:24 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/8572

Comment 4 Russell Teague 2018-06-04 13:03:36 UTC
In openshift-ansible-3.10.0-0.56.0

Comment 5 liujia 2018-06-05 02:44:25 UTC
Verified on openshift-ansible-3.10.0-0.58.0.git.0.d8f6377.el7.noarch

Comment 7 errata-xmlrpc 2018-07-30 19:16:18 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-2018:1816


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