rally verify configure-verifier --extend extra-options.conf converts options to lowercase
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rally |
Fix Released
|
Undecided
|
Xing Zhang |
Bug Description
`rally verify configure-verifier --extend extra-options.conf` converts options to lower case which case some tests runs with unexpected result. Use `rally verify configure-verifier --show` to
see the extended config file.
Here is an example:
octavia-
[load_balancer]
RBAC_test_type = owner_or_admin
the option is defined here:
https:/
octavia-
https:/
rally extend extra options by using configparser:
https:/
configparser converts options to lowercase:
https:/
configparser dose not sensitive to lowercase or uppercase, but oslo.conf does:
$ python
Python 2.7.5 (default, Apr 2 2020, 13:16:51)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import configparser
>>> conf = configparser.
>>> conf.read(
['extra-
>>> conf['load_
[u'rbac_test_type']
>>> conf['load_
u'owner_or_admin'
>>> conf['load_
u'owner_or_admin'
>>>
$ python
Python 2.7.5 (default, Apr 2 2020, 13:16:51)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tempest import config
>>> CONF = config.CONF
>>> CONF.load_
'advanced'
>>> CONF.load_
2020-05-11 14:20:32.483 2619 CRITICAL tempest [-] Unhandled error: NoSuchOptError: no such option rbac_test_type in group [load_balancer]
2020-05-11 14:20:32.483 2619 ERROR tempest Traceback (most recent call last):
2020-05-11 14:20:32.483 2619 ERROR tempest File "<stdin>", line 1, in <module>
2020-05-11 14:20:32.483 2619 ERROR tempest File "/var/lib/
2020-05-11 14:20:32.483 2619 ERROR tempest return self._conf.
2020-05-11 14:20:32.483 2619 ERROR tempest File "/var/lib/
2020-05-11 14:20:32.483 2619 ERROR tempest value, loc = self._do_get(name, group, namespace)
2020-05-11 14:20:32.483 2619 ERROR tempest File "/var/lib/
2020-05-11 14:20:32.483 2619 ERROR tempest info = self._get_
2020-05-11 14:20:32.483 2619 ERROR tempest File "/var/lib/
2020-05-11 14:20:32.483 2619 ERROR tempest raise NoSuchOptError(
2020-05-11 14:20:32.483 2619 ERROR tempest NoSuchOptError: no such option rbac_test_type in group [load_balancer]
2020-05-11 14:20:32.483 2619 ERROR tempest
>>>
description: | updated |
description: | updated |
Changed in rally: | |
assignee: | nobody → Xing Zhang (xingzhang) |
summary: |
- rally verify configure-verifier --extend extra-options.conf convert - options and values to lowercase + rally verify configure-verifier --extend extra-options.conf converts + options to lowercase |
description: | updated |
Looks valid. `conf.optionxform = str ` should be used before reading the file to prevent case transformation.
Can you propose a fix?