The docs job has recently begun failing with:
autodoc: failed to import module 'connector' from module
'os_brick.initiator'; the following exception was raised: No module
named 'cryptography'
We're not directly importing cryptography in os-brick, so address this
by adding 'cryptography' to the autodoc_mock_imports list.
Change-Id: I5128d717f7a31fb9042f690ed7c17a3191f1a99e
We currently have 2 different connection information formats: The
initial one and the new one.
Within the new format we have 2 variants: Replicated and Not replicated.
Currently the nvmeof connector has multiple code paths and we end up
finding bugs that affect one path and not the other, and bugs that are
present in both may end up getting fixed in only one of them.
This patch consolidates both formats by converting the connection
information into a common internal representation, thus reducing the
number of code paths.
Thanks to this consolidation the Cinder drivers are less restricted on
how they can identify a volume in the connection information. They are
no longer forced to pass the NVMe UUID (in case they cannot get that
information or the backend doesn't support it) and they can provide
other information instead (nguid or namespace id).
This connection properties format consolidation is explained in the new
NVMeOFConnProps class docstring.
By consolidating the code paths a number of bugs get fixed
automatically, because they were broken in one path but not in the
other. As examples, the old code path didn't have rescans but the new
one did, and the old code path had device flush but the new one didn't.
Given the big refactoring needed to consolidate everything this patch
also accomplishes the following things:
- Uses Portal, Target, and NVMeOFConnProps classes instead of using the
harder to read and error prone dictionaries and tuples.
- Adds method annotations.
- Documents most methods (exect the raid ones which I'm not familiar
with)
- Adds the connector to the docs.
- Makes method signatures conform with Cinder team standards: no more
static methods passing self and no more calling class methods using
the class name instead of self.
Closes-Bug: #1964590
Closes-Bug: #1964395
Closes-Bug: #1964388
Closes-Bug: #1964385
Closes-Bug: #1964380
Closes-Bug: #1964383
Closes-Bug: #1965954
Closes-Bug: #1903032
Related-Bug: #1961102
Change-Id: I6c2a952f7e286f3e3890e3f2fcb2fdd1063f0c17
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
Raise the minimum versions in the various requirements files to
reflect what we're actually testing with right now.
Change-Id: Ie7dcc859e1291bd1d50b1ae516be38d8732de836
In python 3, all strings are considered as unicode string.
This patch drops the explicit unicode literal (u'...')
or (u"..") appearances from the unicode strings.
Change-Id: I833d797cdc14fc360575d7df5026b51e96c367ef
The latest pip version has a stricter dependency resolver,
which broke the "lower-constraints" job for quite a few openstack
projects, including os-brick and cinder.
This change alings the os-brick dependency version constraints with
the ones used by Cinder, thus fixing the lower constraints job.
Change-Id: I4a6ac7ec0974372dc6f1585a797c7023c2fd8d78
The CORAID driver was removed many cycles ago. This cleans up os-brick
and removes the unused connector.
Depends-on: https://review.opendev.org/745393
Change-Id: I45ac41509f8fec9eb8f57aa03bcfb439a361b561
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I4ce76439f598b73d0520577bb3b47c7f28ed3663
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I4927ff7bbdb737884055dd584bc37bd9e93827be
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
We stopped testing against py2 with commit df2a396, so remove
unsupported python versions from the requirements files.
Change-Id: I2aca65d734d7b6089f0e3ad7836f509f4b968098
The previously choosen PDF file name conflicts in some repos with the
project logos (badge). Thus change https://review.opendev.org/679777
renames the desired PDF name to be doc-PROJECT.pdf to allow using the
badge in PDF files.
Follow this rename.
Change-Id: I6fbddc841039a9a66998b4ca7ae81742852d12ae
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.
Change-Id: I2281904c98f574dc5f42f31a12ebf5d1a4bdb48c
We have three populated sections:
- install
- user
- reference
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.
Change-Id: I04e426faf337f0b03175f439c80b3369d4066733
Clean up both the releasenotes 'conf.py' and some remaining pieces of
the main 'conf.py'. In the case of the former, it looks like this was
copied from Cinder's config, and retains a lot of unnecessary config for
same. Remove it all.
It is also necessary to remove a docstring from 'os_brick/__init__.py',
as this was causing build issues. No idea how this was building
previously.
Change-Id: I2ca913c2ebcf2030642b18c72af180bb8f03b288
ISERConnector was retired in https://review.openstack.org/#/c/193451
but it remains in the documentation. This produces errors at
build time.
Change-Id: I76918931264816a04fca981e02bdaafd59072dd9
Manually maintaining the changelog leads to issues when the anticipated
version does not match the version actually tagged. Use pbr's facility
for building a rst changelog automatically instead, to ensure that the
published documentation matches the package.
Change-Id: I9cd8ff88aeebc15db48f47c731725a6b0da152b5
This patch intends to update the base documenation that is built
for the os-brick library. It includes the API documentation,
changelog, tutorial.
You can generate the documentation by running:
tox -edocs
DocImpact
Change-Id: Ia0fe0118207bbdc3cf698dfe09c0b71ebddd57f3