Commit Graph

12 Commits

Author SHA1 Message Date
Brian Rosmaita f165c6ff5e Stop cinderlib development
Remove files from master, as development will no longer occur there.
The stable branches continue to be supported while they are in
Maintained status.

Updated the README to indicate this change.

Depends-on: Ib186ac5830e5920e264d79be946995e63e960426
Depends-on: I081cd363117671eaab6a3193094d5872f9820354
Depends-on: If2b9a82cddb20543b176ee22765049db257c89b9
Depends-on: I1143e5e5ccf8103e386fe1ce614a554e7f152d9a
Change-Id: I4722b869033ad1bd357e36c4a258b6d3ea61f5d6
2024-01-05 16:03:46 +00:00
Brian Rosmaita 30af4ccedf Don't use yum to install ceph
Use the ansible builtin 'package' module instead.

Change-Id: I244c1896a3c17b43496bef09ee4c8ae76522f565
2022-07-18 11:31:48 -04:00
Gorka Eguileor 30c9c0f280 Update Ceph version on CI job
Job cinderlib-ceph-functional is using Ceph Luminous, which has been EOL
since March 2020.

This patch updates the job to use an active release, Ceph Pacific.

In the new container they no longer automatically create the rbd pool,
so the patch also updates the playbook to create the pool.

Change-Id: I09a2a9b07ed8b6d994485079febd0bd0190aa6c9
2022-06-15 18:38:14 +02:00
Gorka Eguileor 6ad3c4a19c Fix cinderlib-lvm-functional
In change-id I867c972d9f712c0df4260ebc8211b786006ed7a2 the os-brick
library added a new binary dependency, lsscsi, and now the cinderlib lvm
functional tests and tempest with lvm are failing because they cannot
find the package.

The reason why the CI didn't fail on the patch is because devstack
installs the bindeps of the projects installed from source, but Zuul
doesn't do the same for the "required-projects".

To solve this issue an prevent future gate breaks this patch uses the
bindep zuul role to install os-brick missing packages before running any
of its functional jobs.

For the tempest lvm job we install os-brick from source, which makes
devstack automatically install bindeps from the project.

Change-Id: Ieb4e94850a1705a5d2b36a9a963646f10250e811
2020-08-07 14:46:23 +02:00
Gorka Eguileor 543fe8a7d2 Fix rbd attach on python3
Attaching an RBD volume fails when we run the code as root if we are
using Python 3.

We see a DeviceUnavailable exception:

    conn.attach()
  File "/usr/lib/python3.6/site-packages/cinderlib/objects.py", line
    842, in attach reason=error_msg)
cinder.exception.DeviceUnavailable: The device in the path None is
unavailable: Unable to access the backend storage via path /dev/rbd0.

The exception message also shows None as the path, even though the
description of the exception shows it correctly.

The underlying error is a UnicodeDecodeError that happens because when
we run as root we open the RBD device directly in Python to check if it
is available, but we do it as text, not as binary.

This patch changes how we open the file, doing it as binary, and reports
the right path on the exception.

Closes-Bug: #1873312
Change-Id: I967caa2df84d870c1be4d69f32481fc75c3be010
2020-04-22 13:39:40 +02:00
Luigi Toscano 08108b5964 Use Python 3 by default and drop Python 2
Follow the rest of OpenStack and consistently switch to
python3 as default python interpreter and drop python2.

The "functional" tox target was failing with Python 2
as cinder/master has cut the Python 2.7 compatibility.
"functional" now points to the default python3. An explicit
"functional-py37" target has been added as well.

Fix the functional jobs as well:
- move the LVM job to centos-8 and adapt it when needed;
- move the Ceph job to ubuntu-bionic, as there are no
  CentOS 8 Ceph packages (and the CentOS 7 ones do not
  provide Python 3 bindings).

Closes-Bug: #1853372
Change-Id: Iea4f4f53df7400248848399494564910d3870f63
2020-01-10 15:03:23 +01:00
Zuul 7f61d74337 Merge "Fake unused packages" 2019-10-24 13:46:07 +00:00
Gorka Eguileor 76d0164fb0 Fake unused packages
Many packages that are automatically imported when loading cinder
modules are only used for normal Cinder operation and are not necessary
for cinderlib's execution.

One example of this happening is when cinderlib loads a Cinder module to
get configuration options but won't execute any of the code present in
that module.

This patch fakes these unnecessary packages, providing faster load
times, reduced footprint, and the possibility for distributions to
create a cinderlib package or containers with up to 40% fewer
dependencies.

Change-Id: If577b9163d4e942b701db4b2a47cd66e6bd17b6f
2019-10-21 21:28:28 +02:00
Luigi Toscano 4610703e7f zuul: change the cinderlib test runner into a role
A role can be easily reused elsewhere (for example by cinder
and cinder-tempest-plugins jobs).

The role is a wrapper around the default 'tox' role.
In order to make it working, CL_FTEST_CFG needs to be
overwritable completely, otherwise it is not possible
for tests to set a full path.

Finally, whitelist stestr to avoid tox warnings.

Change-Id: I274dd1da499e320e6d63af750cacb25e01df7561
2019-07-31 16:51:37 +02:00
Gorka Eguileor cd5365db2f Add zuul jobs
This patch adds the following Zuul CI jobs:

- Python 2.7 unit tests
- Python 3.6 unit tests
- Functional tests with LVM
- Functional tests with Ceph
- Publis documentation
- Release notes

Change-Id: I2f3f34c1db4716b323c48908f51500898c2c6242
2019-02-26 16:21:34 +01:00
Gorka Eguileor 77f399fd96 Format as a Cinder-related OpenStack project
Since we are going to be importing the project into OpenStack we need it
to follow the same structure as the other projects under the Cinder
umbrella.
2019-02-19 16:28:03 +01:00
Gorka Eguileor e93d054ae7 Prepare for cinder gate test
We want to be able to run cinderlib functional tests on Cinder gates, so
this patch adds a playbook and a tool to convert from Cinder's config
file to the YAML required by our functional tests.

The cinder-gate-run playbook uses cinderlib_ignore_errors variable to
define whether the playbook should fail on errors or should they just be
ignored.

The playbook stores the test run results on the common logs directory so
they are automatically saved by the Cinder gate jobs.
2018-09-05 19:54:26 +02:00