diff --git a/cinder/cmd/backup.py b/cinder/cmd/backup.py index a3381364fb7..2f10be14710 100644 --- a/cinder/cmd/backup.py +++ b/cinder/cmd/backup.py @@ -34,6 +34,7 @@ import __original_module_threading as orig_threading # pylint: disable=E0401 import threading # noqa orig_threading.current_thread.__globals__['_active'] = threading._active +import os_brick from oslo_concurrency import processutils from oslo_config import cfg from oslo_log import log as logging @@ -108,6 +109,7 @@ def main(): priv_context.init(root_helper=shlex.split(utils.get_root_helper())) utils.monkey_patch() gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) + os_brick.setup(CONF) global LOG LOG = logging.getLogger(__name__) semaphore = utils.semaphore_factory(CONF.backup_max_operations, diff --git a/cinder/cmd/volume.py b/cinder/cmd/volume.py index 4fae53d3e57..508bc6c07e3 100644 --- a/cinder/cmd/volume.py +++ b/cinder/cmd/volume.py @@ -40,6 +40,7 @@ import __original_module_threading as orig_threading # pylint: disable=E0401 import threading # noqa orig_threading.current_thread.__globals__['_active'] = threading._active +import os_brick from oslo_config import cfg from oslo_log import log as logging from oslo_privsep import priv_context @@ -178,6 +179,7 @@ def main(): priv_context.init(root_helper=shlex.split(utils.get_root_helper())) utils.monkey_patch() gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) + os_brick.setup(CONF) global LOG LOG = logging.getLogger(__name__) diff --git a/releasenotes/notes/lock_path-940af881b2112bbe.yaml b/releasenotes/notes/lock_path-940af881b2112bbe.yaml new file mode 100644 index 00000000000..39d60a0e512 --- /dev/null +++ b/releasenotes/notes/lock_path-940af881b2112bbe.yaml @@ -0,0 +1,12 @@ +--- +features: + - | + os-brick file lock location can be specified independently of the Cinder + service lock location using ``lock_path`` in the ``[os_brick]`` + configuration section. Useful for HCI deployments and when running Cinder + and Glance with Cinder backend on the same host. +upgrade: + - | + On HCI deployments and when running Cinder and Glance with Cinder backend + on the same host an os-brick shared location can be configured using the + ``lock_path`` in the ``[os_brick]`` configuration section. diff --git a/requirements.txt b/requirements.txt index bb2ff913dd1..10b066d5c55 100644 --- a/requirements.txt +++ b/requirements.txt @@ -56,7 +56,7 @@ tenacity>=6.3.1 # Apache-2.0 WebOb>=1.8.6 # MIT oslo.i18n>=5.1.0 # Apache-2.0 oslo.vmware>=3.10.0 # Apache-2.0 -os-brick>=5.2.0 # Apache-2.0 +os-brick>=6.0.0 # Apache-2.0 os-win>=5.5.0 # Apache-2.0 tooz>=2.7.1 # Apache-2.0 google-api-python-client>=1.11.0 # Apache-2.0 diff --git a/tools/config/cinder-config-generator.conf b/tools/config/cinder-config-generator.conf index 0ebd6b1c51d..44267420ae2 100644 --- a/tools/config/cinder-config-generator.conf +++ b/tools/config/cinder-config-generator.conf @@ -19,3 +19,4 @@ namespace = oslo.service.service namespace = oslo.service.sslutils namespace = oslo.service.wsgi namespace = oslo.versionedobjects +namespace = os_brick