Bug 1389275

Summary: Installation failed when enabling OpenStack cloudprovider
Product: OpenShift Container Platform Reporter: Gan Huang <ghuang>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED ERRATA QA Contact: Gan Huang <ghuang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.1CC: aos-bugs, jokerman, mlamouri, mmccomas
Target Milestone: ---Keywords: Regression
Target Release: 3.2.1   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: openshift-ansible-3.2.37-1.git.0.8f013d0.el7 Doc Type: Bug Fix
Doc Text:
Previous versions of the openshift-ansible code base were not compatible with the latest Ansible release. We have resolved several compatibility issues with the GA version of Ansible
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-15 19:10:18 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:
Bug Depends On: 1392365    
Bug Blocks:    

Description Gan Huang 2016-10-27 10:35:31 UTC
Description of problem:
Installation would failed at task "[openshift_cloud_provider : Create cloud config]" when enabling OpenStack cloudprovider.

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

How reproducible:

Steps to Reproduce:
1.cat hosts

2.Run BYO playbook

Actual results:
TASK [openshift_cloud_provider : Create cloud config] **************************
Thursday 27 October 2016  06:04:28 +0000 (0:00:00.093)       0:07:00.442 ****** 
fatal: [openshift-133.lab.sjc.redhat.com]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string ([Global]\nauth-url = {{ openshift_cloudprovider_openstack_auth_url }}\nusername = {{ openshift_cloudprovider_openstack_username }}\npassword = {{ openshift_cloudprovider_openstack_password }}\n{% if openshift_cloudprovider_openstack_tenant_id is defined %}\ntenant-id = {{ openshift_cloudprovider_openstack_tenant_id }}\n{% else %}\ntenant-name = {{ openshift_cloudprovider_openstack_tenant_name }}\n{% endif %}\n{% if openshift_cloudprovider_openstack_region is defined %}\nregion = {{ openshift_cloudprovider_openstack_region }}\n{% endif %}\n{% if 'lb_subnet_id' in openshift_cloudprovider_openstack %}\n[LoadBalancer]\nsubnet-id = {{ openshift_cloudprovider_openstack_lb_subnet_id }}\n{% endif %}\n).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable"}

Expected results:
Installation success when enabling cloudprovider

Additional info:

Comment 1 Gan Huang 2016-10-27 10:51:34 UTC
Looks like it works for me to modify:

{% if 'lb_subnet_id' in openshift_cloudprovider_openstack %}


{% if openshift_cloudprovider_openstack_lb_subnet_id is defined %}

Comment 2 Scott Dodson 2016-10-27 13:37:44 UTC
Problem only exists in 3.2.

Comment 3 Scott Dodson 2016-10-27 14:35:12 UTC
Gan's fix is here https://github.com/openshift/openshift-ansible/pull/2675

Comment 6 Mark Lamourine 2016-11-01 18:14:15 UTC
Still present in 3.2.36-1

Comment 7 Gan Huang 2016-11-03 07:50:01 UTC
PR is not merged to openshift-ansible-3.2.37-1

Comment 8 Scott Dodson 2016-11-04 20:13:17 UTC
In openshift-ansible-3.2.38-1

Comment 9 Gan Huang 2016-11-08 10:47:48 UTC
Verified with openshift-ansible-3.2.39-1.git.0.2c9adff.el7.noarch.rpm

Installation succeed when enabling OpenStack cloudprovider.

Comment 10 errata-xmlrpc 2016-11-15 19:10: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.