OpenStack library for config
Go to file
Stephen Finucane 0a9c6c156a 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)
(cherry picked from commit 22c286c63b)
2019-12-18 18:47:41 +00:00
.zuul.d add python 3.7 unit test job 2019-02-19 13:56:42 +08:00
doc Revert "Optimizing the safety of the http link site in faq.rst." 2018-12-03 23:50:20 +00:00
oslo_config Ensure option groups don't change during logging 2019-12-18 18:47:41 +00:00
releasenotes Merge "Add support for looking in environment for config" 2018-11-02 19:58:06 +00:00
.coveragerc Fix coverage configuration and execution 2015-10-05 17:20:49 -04:00
.gitignore [Configuration] Clean up .gitignore files. 2019-01-24 09:48:23 +01:00
.gitreview OpenDev Migration Patch 2019-04-19 19:35:50 +00:00
.stestr.conf Migrating oslo.config to use stestr 2019-01-15 16:15:34 +08:00
.testr.conf Upgrade testing to use testr. 2013-05-03 17:26:07 -04: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 Add release notes link to README 2018-06-21 13:15:22 +08:00
bindep.txt Add bindep.txt file to prevent fallback to generic list 2018-03-20 10:26:47 -05:00
lower-constraints.txt Merge "Cleaning testrepository occurrences." 2019-01-23 18:57:24 +00:00
requirements.txt Resolve deprecation warning for rfc3986 uri validation 2018-12-25 14:56:21 +03:00
setup.cfg Update mailinglist from dev to discuss 2018-12-05 09:39:24 +08:00
setup.py Updated from global requirements 2017-03-03 00:02:50 +00:00
test-requirements.txt Merge "Cleaning testrepository occurrences." 2019-01-23 18:57:24 +00:00
tox.ini Update UPPER_CONSTRAINTS_FILE for stable/stein 2019-03-18 14:44:07 +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.