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:
parent
dedcc75835
commit
d51723fa64
@ -46,16 +46,14 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
_opts = [
|
_opts = [
|
||||||
cfg.BoolOpt('disable_process_locking', default=False,
|
cfg.BoolOpt('disable_process_locking', default=False,
|
||||||
help='Enables or disables inter-process locks.',
|
help='Enables or disables inter-process locks.'),
|
||||||
deprecated_group='DEFAULT'),
|
|
||||||
cfg.StrOpt('lock_path',
|
cfg.StrOpt('lock_path',
|
||||||
default=os.environ.get("OSLO_LOCK_PATH"),
|
default=os.environ.get("OSLO_LOCK_PATH"),
|
||||||
help='Directory to use for lock files. For security, the '
|
help='Directory to use for lock files. For security, the '
|
||||||
'specified directory should only be writable by the user '
|
'specified directory should only be writable by the user '
|
||||||
'running the processes that need locking. '
|
'running the processes that need locking. '
|
||||||
'Defaults to environment variable OSLO_LOCK_PATH. '
|
'Defaults to environment variable OSLO_LOCK_PATH. '
|
||||||
'If external locks are used, a lock path must be set.',
|
'If external locks are used, a lock path must be set.')
|
||||||
deprecated_group='DEFAULT')
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ import threading
|
|||||||
import time
|
import time
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_config import cfg
|
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
|
|
||||||
from oslo_concurrency.fixture import lockutils as fixtures
|
from oslo_concurrency.fixture import lockutils as fixtures
|
||||||
@ -361,18 +360,6 @@ class LockTestCase(test_base.BaseTestCase):
|
|||||||
with lockutils.lock("foobar"):
|
with lockutils.lock("foobar"):
|
||||||
pass
|
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):
|
class FileBasedLockingTestCase(test_base.BaseTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -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``
|
Loading…
Reference in New Issue
Block a user