yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72693
[Bug 1768498] [NEW] config generation(yaml/json) broken with python3
Public bug reported:
config generation with format yaml/json is broken with python3
Reproduction steps:-
git clone https://github.com/openstack/keystone
cd keystone
sed -i '/\[testenv\:genconfig\]/a basepython=python3' tox.ini
tox -egenconfig
.tox/genconfig/bin/oslo-config-generator --config-file=config-generator/keystone.conf --format yaml --output-file=keystone-schema.yaml
The above command works fine when basepython=python2
with "ini" it works fine:-
.tox/genconfig/bin/oslo-config-generator --config-file=config-generator/keystone.conf --format ini --output-file=keystone-schema.yaml
Actual Output:-
Traceback (most recent call last):
File ".tox/genconfig/bin/oslo-config-generator", line 11, in <module>
sys.exit(main())
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 770, in main
generate(conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 754, in generate
conf=conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 690, in _output_machine_readable
output_data = _generate_machine_readable_data(groups, conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 655, in _generate_machine_readable_data
entry = _build_entry(opt, group_name, namespace[0], conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 601, in _build_entry
entry['type'] = _format_type_name(entry['type'])
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 157, in _format_type_name
return _TYPE_NAMES[opt_type]
TypeError: unhashable type: 'HostAddress'
Expected Output:-
keystone-schema.yaml should be generated
This should be a bug for oslo.config, but found in keystone so reporting against it as well.
** Affects: keystone
Importance: Undecided
Status: New
** Affects: oslo.config
Importance: Undecided
Status: New
** Also affects: oslo.config
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1768498
Title:
config generation(yaml/json) broken with python3
Status in OpenStack Identity (keystone):
New
Status in oslo.config:
New
Bug description:
config generation with format yaml/json is broken with python3
Reproduction steps:-
git clone https://github.com/openstack/keystone
cd keystone
sed -i '/\[testenv\:genconfig\]/a basepython=python3' tox.ini
tox -egenconfig
.tox/genconfig/bin/oslo-config-generator --config-file=config-generator/keystone.conf --format yaml --output-file=keystone-schema.yaml
The above command works fine when basepython=python2
with "ini" it works fine:-
.tox/genconfig/bin/oslo-config-generator --config-file=config-generator/keystone.conf --format ini --output-file=keystone-schema.yaml
Actual Output:-
Traceback (most recent call last):
File ".tox/genconfig/bin/oslo-config-generator", line 11, in <module>
sys.exit(main())
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 770, in main
generate(conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 754, in generate
conf=conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 690, in _output_machine_readable
output_data = _generate_machine_readable_data(groups, conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 655, in _generate_machine_readable_data
entry = _build_entry(opt, group_name, namespace[0], conf)
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 601, in _build_entry
entry['type'] = _format_type_name(entry['type'])
File "/home/ykarel/work/keystone/.tox/genconfig/lib/python3.6/site-packages/oslo_config/generator.py", line 157, in _format_type_name
return _TYPE_NAMES[opt_type]
TypeError: unhashable type: 'HostAddress'
Expected Output:-
keystone-schema.yaml should be generated
This should be a bug for oslo.config, but found in keystone so reporting against it as well.
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1768498/+subscriptions
Follow ups