yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72776
[Bug 1768498] Re: config generation(yaml/json) broken with python3
Reviewed: https://review.openstack.org/566748
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=3e7eecc9f43e4b326018c09d6976489ba5b0d098
Submitter: Zuul
Branch: master
commit 3e7eecc9f43e4b326018c09d6976489ba5b0d098
Author: Lance Bragstad <lbragstad@xxxxxxxxx>
Date: Mon May 7 21:45:22 2018 +0000
Properly initialize HostAddress
The HostAddress class wasn't calling super in it's __init__() method,
which resulted in the type_name not being set properly for instances
of that class.
Change-Id: I4e589f2081e5d95227938cba9ad1158548bc1048
Closes-Bug: 1768498
** Changed in: oslo.config
Status: In Progress => Fix Released
--
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):
Invalid
Status in oslo.config:
Fix Released
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
References