Drop fallback to DEFAULT section

The fallback was added 9 years ago, in 0.1.0 release[1].

[1] c98d5edc44

Change-Id: I3b66c5f9df58eaeea9fc51a6c0b83af2e39a525b
This commit is contained in:
Takashi Kajinami 2024-02-07 23:34:32 +09:00
parent dedcc75835
commit d51723fa64
3 changed files with 10 additions and 17 deletions

View File

@ -46,16 +46,14 @@ LOG = logging.getLogger(__name__)
_opts = [
cfg.BoolOpt('disable_process_locking', default=False,
help='Enables or disables inter-process locks.',
deprecated_group='DEFAULT'),
help='Enables or disables inter-process locks.'),
cfg.StrOpt('lock_path',
default=os.environ.get("OSLO_LOCK_PATH"),
help='Directory to use for lock files. For security, the '
'specified directory should only be writable by the user '
'running the processes that need locking. '
'Defaults to environment variable OSLO_LOCK_PATH. '
'If external locks are used, a lock path must be set.',
deprecated_group='DEFAULT')
'If external locks are used, a lock path must be set.')
]

View File

@ -24,7 +24,6 @@ import threading
import time
from unittest import mock
from oslo_config import cfg
from oslotest import base as test_base
from oslo_concurrency.fixture import lockutils as fixtures
@ -361,18 +360,6 @@ class LockTestCase(test_base.BaseTestCase):
with lockutils.lock("foobar"):
pass
def test_deprecated_names(self):
paths = self.create_tempfiles([['fake.conf', '\n'.join([
'[DEFAULT]',
'lock_path=foo',
'disable_process_locking=True'])
]])
conf = cfg.ConfigOpts()
conf(['--config-file', paths[0]])
conf.register_opts(lockutils._opts, 'oslo_concurrency')
self.assertEqual('foo', conf.oslo_concurrency.lock_path)
self.assertTrue(conf.oslo_concurrency.disable_process_locking)
class FileBasedLockingTestCase(test_base.BaseTestCase):
def setUp(self):

View File

@ -0,0 +1,8 @@
---
upgrade:
- |
The following options are no longer loaded from the ``[DEFAULT] section``.
Set these options in the ``[oslo_concurrency]`` section.
- ``disable_process_locking``
- ``lock_path``