Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1583523 - Inventory variable values with hash sign not properly escaped
Inventory variable values with hash sign not properly escaped
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.9.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.9.z
Assigned To: Scott Dodson
Johnny Liu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-29 03:33 EDT by Eduardo Minguez
Modified: 2018-05-29 11:36 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eduardo Minguez 2018-05-29 03:33:15 EDT
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.

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