Bug 1963964

Summary: Characters are not escaped on config ini file causing Kuryr bootstrap to fail
Product: OpenShift Container Platform Reporter: Maysa Macedo <mdemaced>
Component: NetworkingAssignee: Maysa Macedo <mdemaced>
Networking sub component: kuryr QA Contact: Itzik Brown <itbrown>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: itbrown, mdulko
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:10:05 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:
Bug Depends On:    
Bug Blocks: 1969860    

Description Maysa Macedo 2021-05-24 13:52:35 UTC
Description of problem:

For values that are provided by the user on the configuration file of Kuryr, it's possible that some specific characters are not escaped making the rest of the value of the String to be considered as another option, which won't be defined on the config file, consequently the Kuryr bootstrap fails with:

ubernetes.config [-] /usr/local/bin/kuryr-k8s-controller version 4.1.0
yr-kubernetes [-] Unhandled error: oslo_config.cfg.NoSuchOptError: no such option xxx in group [DEFAULT]
kubernetes Traceback (most recent call last):
kubernetes   File "/usr/local/lib/python3.8/dist-packages/oslo_config/cfg.py", line 3225, in __getitem__
kubernetes     value = self.conf._get(option, group=group,
kubernetes   File "/usr/local/lib/python3.8/dist-packages/oslo_config/cfg.py", line 2631, in _get
kubernetes     value, loc = self._do_get(name, group, namespace)
kubernetes   File "/usr/local/lib/python3.8/dist-packages/oslo_config/cfg.py", line 2649, in _do_get
kubernetes     info = self._get_opt_info(name, group)
kubernetes   File "/usr/local/lib/python3.8/dist-packages/oslo_config/cfg.py", line 2854, in _get_opt_info
kubernetes     raise NoSuchOptError(opt_name, group)
kubernetes oslo_config.cfg.NoSuchOptError: no such option xxx in group [neutron]

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Itzik Brown 2021-06-15 09:40:46 UTC
1. Chagned the password for the tenant with one that contains '$' and updated rc file and clouds.yaml
2. Ran OCP installation
3. Checked that the password in the output of 
oc get cm kuryr-config -n openshift-kuryr -o yaml  
contains '$' escaped

OCP Version:4.8.0-0.nightly-2021-06-14-145150
OSP RHOS-16.1-RHEL-8-20210506.n.1

Comment 6 errata-xmlrpc 2021-07-27 23:10:05 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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-2021:2438