Bug 1583523 - Inventory variable values with hash sign not properly escaped
Summary: Inventory variable values with hash sign not properly escaped
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.9.z
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-29 07:33 UTC by Eduardo Minguez
Modified: 2018-11-16 15:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-16 15:21:53 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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