OpenStack library for config
Go to file
Stephen Finucane 22c286c63b Ensure option groups don't change during logging
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 e3e2ba55ee)
2019-12-18 00:52:35 +00:00
.zuul.d Add Python 3 Train unit tests 2019-07-05 14:43:07 -04:00
doc Merge "Bump the openstackdocstheme extension to 1.20" 2019-08-09 11:39:15 +00:00
oslo_config Ensure option groups don't change during logging 2019-12-18 00:52:35 +00:00
releasenotes Bump the openstackdocstheme extension to 1.20 2019-08-01 09:46:12 +08:00
.coveragerc Fix coverage configuration and execution 2015-10-05 17:20:49 -04:00
.gitignore Clean up the unnecessary sphinx from test-requirements.txt 2019-07-07 11:59:49 +08:00
.gitreview Update .gitreview for stable/train 2019-09-20 16:30:56 +00:00
.stestr.conf Migrating oslo.config to use stestr 2019-01-15 16:15:34 +08:00
CONTRIBUTING.rst trivial change to contributing instructions 2018-02-19 09:51:56 -05:00
HACKING.rst Update URLs in documents according to document migration 2017-07-12 22:32:03 +08:00
LICENSE Add LICENSE file 2013-02-17 09:25:32 +00:00
README.rst Revert "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-03 20:36:15 +00:00
bindep.txt Add bindep.txt file to prevent fallback to generic list 2018-03-20 10:26:47 -05:00
lower-constraints.txt Bump the openstackdocstheme extension to 1.20 2019-08-01 09:46:12 +08:00
requirements.txt Resolve deprecation warning for rfc3986 uri validation 2018-12-25 14:56:21 +03:00
setup.cfg Add Python 3 Train unit tests 2019-07-05 14:43:07 -04:00
setup.py Updated from global requirements 2017-03-03 00:02:50 +00:00
test-requirements.txt Clean up the unnecessary sphinx from test-requirements.txt 2019-07-07 11:59:49 +08:00
tox.ini Update TOX/UPPER_CONSTRAINTS_FILE for stable/train 2019-09-20 16:31:01 +00:00

README.rst

Team and repository tags

image

Oslo Configuration Library

Latest Version

Downloads

The Oslo configuration API supports parsing command line arguments and .ini style configuration files.