Bug 1389275 - Installation failed when enabling OpenStack cloudprovider
Summary: Installation failed when enabling OpenStack cloudprovider
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.2.1
Assignee: Scott Dodson
QA Contact: Gan Huang
URL:
Whiteboard:
Depends On: 1392365
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-27 10:35 UTC by Gan Huang
Modified: 2016-11-15 19:10 UTC (History)
4 users (show)

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 2.2.0.0 release. We have resolved several compatibility issues with the GA version of Ansible 2.2.0.0.
Clone Of:
Environment:
Last Closed: 2016-11-15 19:10:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2778 0 normal SHIPPED_LIVE Moderate: atomic-openshift-utils security and bug fix update 2016-11-16 00:08:29 UTC

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):
openshift-ansible-3.2.36-1.git.0.164eb4c.el7.noarch.rpm
ansible-2.2.0.0-0.62.rc1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1.cat hosts
<--snip-->
openshift_cloudprovider_kind=openstack
openshift_cloudprovider_openstack_auth_url=xxxxx
openshift_cloudprovider_openstack_username=xxxx
openshift_cloudprovider_openstack_password=xxxx
openshift_cloudprovider_openstack_tenant_id=xxxxx
openshift_cloudprovider_openstack_region=RegionOne
<--snip-->

2.Run BYO playbook
3.

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 %}

to

{% 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.

https://access.redhat.com/errata/RHSA-2016:2778


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