Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1583523

Summary: Inventory variable values with hash sign not properly escaped
Product: OpenShift Container Platform Reporter: Eduardo Minguez <eminguez>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED DEFERRED QA Contact: Johnny Liu <jialiu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.9.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-11-16 15:21:53 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-05-29 07:33:15 UTC
Description of problem:

Having an OpenStack provider where the password contains a hash sign (#) the openshift_cloudprovider_openstack_password variable value should be escaped twice in order to make it work.

Version-Release number of the following components:

[cloud-user@crio-bastion ~]$ rpm -q openshift-ansible
openshift-ansible-3.9.27-1.git.0.52e35b5.el7.noarch
[cloud-user@crio-bastion ~]$ rpm -q ansible
ansible-2.4.4.0-1.el7ae.noarch
[cloud-user@crio-bastion ~]$ ansible --version
ansible 2.4.4.0
  config file = /home/cloud-user/ansible.cfg
  configured module search path = [u'/home/cloud-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

How reproducible:

Run the installer with the OSP password configured as:
openshift_cloudprovider_openstack_password=mypasswordwith###hashsigns

Steps to Reproduce:
1. Try to deploy OCP using the ansible installer with the variable previously explained
2.
3.

Actual results:
Authentication failed when starting the master API.

Expected results:
API start ok

Additional info:
The /etc/origin/cloudprovider/openstack.conf file is configured as:

[Global]
auth-url = https://myurl
username = myusername
password = mypasswordwith###hashsigns
domain-name = whatever
tenant-name = whatever
region = whatever

After a few tries, if the variable is 'double escaped' as:

openshift_cloudprovider_openstack_password='"mypasswordwith###hashsigns"'

the openstack.conf file generated is

[Global]
auth-url = https://myurl
username = myusername
password = "mypasswordwith###hashsigns"
domain-name = whatever
tenant-name = whatever
region = whatever

And it works.

Comment 1 Russell Teague 2018-11-16 15:21:53 UTC
There are no active cases related to this bug. As such we're closing this bug in order to focus on bugs that are still tied to active customer cases. Please re-open this bug if this bug becomes relevant to an open customer case.