22c286c63b
oslo.config allows us to configure groups and options dynamically. This
can cause a race with our logging as we attempt to iterate through
option groups that are changing under our feet. This wouldn't be a huge
issue, since these are just logs are we can always log again, if needed,
but we store groups in a dictionary and Python doesn't like us changing
the size of a dict it's iterating through:
RuntimeError: dictionary changed size during iteration
Given that we're only reading through this option group and don't need
to worry about a group _disappearing_, the solution is pretty simple:
create a copy of our option group names ahead of time so we don't need
to worry about new ones coming and messing things up.
No tests are included since this is a race and the only way I see to
reproduce this would involve lots of ugly threading.
Change-Id: Id3b28465d645a24f0fcebff2dd68a9bd30e21594
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1856312
(cherry picked from commit
|
||
---|---|---|
.zuul.d | ||
doc | ||
oslo_config | ||
releasenotes | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.stestr.conf | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
bindep.txt | ||
lower-constraints.txt | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
Team and repository tags
Oslo Configuration Library
The Oslo configuration API supports parsing command line arguments and .ini style configuration files.
- License: Apache License, Version 2.0
- Documentation: https://docs.openstack.org/oslo.config/latest/
- Source: https://git.openstack.org/cgit/openstack/oslo.config
- Bugs: https://bugs.launchpad.net/oslo.config
- Release notes: https://docs.openstack.org/releasenotes/oslo.config/