52 lines
1.3 KiB
INI
Raw Normal View History

[metadata]
name = os-brick
summary = OpenStack Cinder brick library for managing local volume attaches
description_file =
README.rst
author = OpenStack
author_email = openstack-discuss@lists.openstack.org
home_page = https://docs.openstack.org/os-brick/
python_requires = >=3.8
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
[files]
packages =
os_brick
data_files =
etc/ = etc/*
Support independent file lock path OS-Brick uses file locks to ensure single access to critital sections, and uses the oslo concurrency "lock_path" configuration option to determine where to create these locks. This is fine when each host has a single service using os-brick, which is the case of Compute nodes and Controller nodes where Glance is not using Cinder as its backend. The problem happens when we have an HCI deployment where Cinder and Nova are collocated on the same host or when Glance uses Cinder as its backend and is running on the same host. In those scenarios os-brick will create file locks in different paths for each service, which is not the intended behavior. A possible solutions is to set the "lock_path" of all the services to the same location, which is not great, not only because we'll have all nova, cinder, glance, and os-brick locks mixed in a single location (service prefixes help a bit here), but also because then Cinder will have permissions on the Nova and Glance locks, which doesn't seem right. This patch introduces a new mechanism in os-brick to have its own "lock_path" configuration option in the "os_brick" group. It defaults to the current behavior if not explicitly defined, so it will use olso concurrency's "lock_path". To do this the patch introduces the oslo.config dependency and adds a new "setup" method that sets the default of the os_brick "lock_path". This new "setup" method is required because the order in which configuration options for the different namespaces are imported cannot be guaranteed, so the setup must be called *after* the service has already imported all (or at least the ones os-brick cares about) configuration option namespaces. In other words, when os-brick files are loaded the value for oslo concurrency's "lock_path" is not yet known, so it cannot be used as a default, and the oslo_config substitution feature does not support values from other namespaces, so we cannot default the "lock_path" from the os_brick namespace to the value in "oslo_concurrency". Since the value that is going to be used as the "lock_path" is not known until the "setup" method is called, we cannot use the standard "synchronized" method from "oslo_concurrency.lock_utils" and we need to use our own. In the current os-brick code, each connector that requires a lock is importing and creating its own "synchronized" instance, but this patch changes this behavior and creates a single instance, just like Cinder does. This feature requires changes in multiple projects -os-brick, cinder, nova, glance, glance_store, devstack- to be fully supported, but this is the base of all this effort. Change-Id: Ic52338278eb5bb3d90ce582fe6b23f37eb5568c4
2022-07-11 11:37:38 +02:00
[entry_points]
oslo.config.opts =
os_brick = os_brick.opts:list_opts
oslo.config.opts.defaults =
os_brick = os_brick.opts:set_defaults
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
[mypy]
show_column_numbers = true
show_error_context = true
ignore_missing_imports = true
follow_imports = skip
incremental = true
check_untyped_defs = true
warn_unused_ignores = true
show_error_codes = true
pretty = true
html_report = mypy-report
no_implicit_optional = true