Bug 1614813

Summary: Add 'openshift_cloudprovider_openstack_conf_file' to 3.10
Product: OpenShift Container Platform Reporter: Eduardo Minguez <eminguez>
Component: InstallerAssignee: Tzu-Mainn Chen <tzumainn>
Status: CLOSED CURRENTRELEASE QA Contact: Gaoyun Pei <gpei>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.10.0CC: aos-bugs, jokerman, mmccomas, vlaad
Target Milestone: ---   
Target Release: 3.10.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-08 11:44:50 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:
Embargoed:

Description Eduardo Minguez 2018-08-10 13:18:48 UTC
Description of problem: Currently there are a few parameters exposed for the openstack.conf file in the installer and there is a general openshift_cloudprovider_openstack_conf_file parameter that can be used to fully customize it https://github.com/openshift/openshift-ansible/commit/de0f9b65d03ee66b86f5dd28320bc412fa727549#diff-04c3f00aafc8bae55d5f6554ea60d9af

It has been merged in the 3.10 branch of origin and it would be nice to backport it to OCP 3.10.

Version-Release number of the following components:
# rpm -qa | grep openshift-ansible
openshift-ansible-3.10.21-1.git.0.6446011.el7.noarch
openshift-ansible-roles-3.10.21-1.git.0.6446011.el7.noarch
openshift-ansible-docs-3.10.21-1.git.0.6446011.el7.noarch
openshift-ansible-playbooks-3.10.21-1.git.0.6446011.el7.noarch

How reproducible:
Look for openshift_cloudprovider_openstack_conf_file in /usr/share/ansible/openshift-ansible/roles/openshift_cloud_provider/tasks/openstack.yml

Steps to Reproduce:
1. Install latest openshift-ansible
2.
3.

Actual results:
The openshift_cloudprovider_openstack_conf_file variable and the modifications to make it work here (https://github.com/openshift/openshift-ansible/commit/de0f9b65d03ee66b86f5dd28320bc412fa727549#diff-04c3f00aafc8bae55d5f6554ea60d9af) are missing

Expected results:
openshift_cloudprovider_openstack_conf_file available

Additional info:

Comment 1 Scott Dodson 2018-08-10 13:28:21 UTC
Wait, if it's already merged into release-3.10 then it'll be in the next 3.10 errata. Assigning to Tzu Mainn who did the backport, marking MODIFIED.

Comment 2 Scott Dodson 2018-08-14 21:39:58 UTC
Should be in openshift-ansible-3.10.28-1

Comment 3 Gaoyun Pei 2018-08-20 07:00:03 UTC
Verify this bug with openshift-ansible-3.10.28-1.git.0.9242c73None.noarch

1) When cloudprovider enabled for ocp-3.10 installation on Openstack, if no openshift_cloudprovider_openstack_conf_file specified, installer will create a cloud config file based on Openstack credentials set in the ansible inventory.

[root@qe-gpei-oomaster-etcd-1 ~]# cat /etc/origin/cloudprovider/openstack.conf 
[Global]
auth-url = xxx
username = xxx
password = xxx
tenant-id = xxx
region = xxx


2) When cloudprovider enabled for ocp-3.10 installation on Openstack, also with openshift_cloudprovider_openstack_conf_file defined in the ansible inventory, installer will copy this file to all hosts.

TASK [openshift_cloud_provider : Create cloud config from local file] *******************************************************************************************************
changed: [host-8-242-215.host.centralci.eng.rdu2.redhat.com] => {"changed": true, "checksum": "eee02dcfa65e70f0400f64644df4b75ff41035c6", "dest": "/etc/origin/cloudprovider/openstack.conf", "failed": false, "gid": 0, "group": "root", "md5sum": "beb6db993aefd79692830b93079935f0", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 16, "src": "/root/.ansible/tmp/ansible-tmp-1534746491.88-171907973562078/source", "state": "file", "uid": 0}