Without this, "tox -e py38" fails with an error from
error: Multiple top-level packages discovered in
a flat-layout: ['etc', 'os_brick', 'releasenotes'].
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
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
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.
This adds the "tox -e mypy" environment which works
the same way we have introduced mypy in Cinder.
Files added to mypy-files.txt are validated with mypy.
Resolves warnings like the following:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.
Signed-off-by: Sean McGinnis <firstname.lastname@example.org>
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
Makes Python 3 the base python for all tox venvs and removes
py2 jobs from zuul.yaml.
- move the legacy gate jobs from openstack-zuul-jobs to the os-brick
repo and make them py3 jobs
- adjust setup.cfg to require py3 and remove py2 requirements from
test-requirements.txt and doc/requirements.txt
We have three populated sections:
There are three docs removed, as they served little useful purpose and
were mostly unreferenced.
Sphinx's 'warning-is-error' option is enabled to catch the few issues
that has snuck into the docs.
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
And already the infra team and the oslo team are dropping py33
support from their projects.
Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.
Since there are so many components in openstack,
by describing the URL info in the configuration file,
it is more convenient to find the developer documentation
than from the unified portal
This patch adds os-bricks list of rootwrap filters for commands
that are needed to execute. The filters are a self contained entire
list of expected filters that os-brick needs to run. It's expected that
this filter file is added to any rootwrap enabled service that needs to use
Devstack associated patch: https://review.openstack.org/#/c/207677/
UpgradeImpact: Need to place the os-brick.filters file in service's
rootwrap.d directory to enable filters.